hi there.
I have created a c# program, but I am having trouble getting it to print correctly.
In the print preview everything seems fine, but when I print some part deosn't get printed...
I print the documents with landscape orientation. It seems that everything is within the limits, but when I print, the part of the document that is on the bottom right corner of the page is not printed...
I don't know why this happens...And don't know where else to look. Here is the code for setting up the margins of the page:
and these are the global variables in my main form:
any help is very much appreciated...
I have created a c# program, but I am having trouble getting it to print correctly.
In the print preview everything seems fine, but when I print some part deosn't get printed...
I print the documents with landscape orientation. It seems that everything is within the limits, but when I print, the part of the document that is on the bottom right corner of the page is not printed...
I don't know why this happens...And don't know where else to look. Here is the code for setting up the margins of the page:
Code:
private void SetupMargins() {
Margins margins = new Margins(25, 25, 25, 25);
pgSettings.PrinterSettings.DefaultPageSettings.Margins = margins;
pgSettings.Margins = margins;
prtSettings.DefaultPageSettings.Margins = margins;
printDoc.DefaultPageSettings = pgSettings;
printDoc.PrinterSettings = prtSettings;
printDoc.DefaultPageSettings.PrinterSettings = prtSettings;
}
and these are the global variables in my main form:
Code:
private PrintDocument printDoc = new PrintDocument();
private PageSettings pgSettings = new PageSettings();
private PrinterSettings prtSettings = new PrinterSettings();
any help is very much appreciated...