Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Last page of PDF will not print

$
0
0
Hi, I am evaluating ASPOSE to use for printing existing PDF files using asp.net. I can print the file just fine with the exception of the last page. The last page of each file will not print. Aspose.Pdf.Facades.PdfViewer.Pagecount reports the correct number of pages. Please see the code below: { string fname = @"\\is-apps02\RPM\Working\Admin\g_payroll.pdf"; Aspose.Pdf.Facades.PdfViewer pdfv = new Aspose.Pdf.Facades.PdfViewer(); System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings(); System.Drawing.Printing.PrinterSettings prin = new System.Drawing.Printing.PrinterSettings(); pdfv.BindPdf(fname); int pgcnt = 0; pgcnt = pdfv.PageCount; txt2.Text = pgcnt.ToString(); prin.PrintRange = System.Drawing.Printing.PrintRange.AllPages; prin.PrinterName = cmbxPrinterNames.SelectedValue.ToString(); prin.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("letter", 827, 1169); pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0); pgs.PaperSize = prin.DefaultPageSettings.PaperSize; pdfv.PrintDocumentWithSettings(pgs, prin); pdfv.Close(); } Any suggestions?

Viewing all articles
Browse latest Browse all 3131

Trending Articles