This code is to show the document printDoc on the Print Preview window.
PrintPreviewDialog dlg = new PrintPreviewDialog();
printDoc.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
//Assign printDoc as the document to preview
dlg.Document = printDoc;
dlg.ShowDialog();
No comments:
Post a Comment