Margin don't appear to work
Posted: 27 May 2011, 00:29
Hi,
Looked at one of the other margin topics on this forum and it helped me understand some things but has not resolved my issue.
Here's the code I use:
No matter what I do with the margins, everything remains the same. I can make the margin 500 and it will still shows the same margins.
If I make PF.Image.IsWithoutMargin = true, then I can't get a margin at all.
What am I missing?
Looked at one of the other margin topics on this forum and it helped me understand some things but has not resolved my issue.
Here's the code I use:
Code: Select all
CADImport.Printing.PrintingForm PF = new CADImport.Printing.PrintingForm();
System.Drawing.Printing.PaperSize PaperSize = new System.Drawing.Printing.PaperSize();
PaperSize.RawKind = (int)System.Drawing.Printing.PaperKind.Letter;
PF.Image = this.cadEditorControl1.Image;
PF.PrintDocument.DefaultPageSettings.PaperSize = PaperSize;
PF.PrintDocument.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(120, 0, 0, 0);
PF.PrintDocument.PrinterSettings.PrinterName = "PrimoPDF";
PF.TypePage = CADImport.Printing.DrawingSize.Fit;
PF.Print(true);
If I make PF.Image.IsWithoutMargin = true, then I can't get a margin at all.
What am I missing?