first doc in print preview are being printed

bonedoc

Well-known member
Joined
May 4, 2006
Messages
112
Programming Experience
Beginner
I am printing multiple pages, and they all show up an look good in the print preview window. But, the first page is always missing when they get printed. Anyone know why this may be?
 
Does this happen if you print directly or only when you preview first? If you preview first and then click the Print button on the PrintPreviewDialog your print routine will get executed twice. For this reason you MUST reset any control variables at the end of the first run so that they contain the correct initial values at the start of the second run. If you only reset these variables before calling Print on your PrintDocument or ShowDialog on your PrintPreviewDialog then chances are they do not contain the correct values when printing after a preview.
 
Back
Top