Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Preview and Actual Print don't match

Status
Not open for further replies.

bluntbill

Programmer
Jun 7, 2006
57
PT
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:

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...
 
does anyone have a clue on how to fix this?

Or any link to a document that explains how to print? I've found some on google but I do as they explain and the printing comes out wrong...
 
I've tried printing on a different printer and the problem continues...

At the print preview everything looks fine, but when it gets printed, the bottom right corner gets cut off...

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top