Reputation:
I'm doing the next:
docToPrint.DefaultPageSettings.PaperSize =
new System.Drawing.Printing.PaperSize("Custom", (int)Math.Round(DocWidth / 0.254), (int)Math.Round(DocHeight / 0.254));
It converts from mm to inches. It's ok. When the PrinterPreview Dialog is shown first time it shows the Custom page size. But when I open pageSetupDialog - it drops all previous and forgets about custom settings.
Generaly my question is Topic.Text + "how?";
Thanks
UPDATE: I FOUND THE SOLUTION. AS I HAVE REPUTATION<100 = have to wait 24 hrs to submit the ANSWER.
That was not easy to understand.
Upvotes: 2
Views: 3611