Printing PDF only prints first 4 pages

Hi,


I want to print a PDF document that has 12 pages. I downloaded the examples from GitHub and used the printing example (I changed a few things in the example code). But I only get the first 4 pages printed. Is this due to any limitations in the trial version?

Her is my code (VB.NET):

Dim pdfv As New Aspose.Pdf.Facades.PdfViewer()
pdfv.AutoRotate = True

Dim pgs As New System.Drawing.Printing.PageSettings()
Dim prin As New System.Drawing.Printing.PrinterSettings()

pdfv.BindPdf(“D:\test.pdf”)
prin.PrinterName = “FreePDF”
prin.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize(“A4”, 827, 1169)
prin.Copies = 2
prin.Collate = True
prin.PrintRange = PrintRange.AllPages

pgs.Margins = New System.Drawing.Printing.Margins(0, 0, 0, 0)
pgs.PaperSize = prin.DefaultPageSettings.PaperSize

pdfv.PrintDocumentWithSettings(pgs, prin)
pdfv.Close()

Regards,
Aline

I solved the problem. I didn’t include the trial license file. Now it works just fine :slight_smile:

Hi Aline,


Thanks for your interest in Aspose and feedback. It is good to know you have managed to resolve the issue at your own.

Please keep using Aspose APIs and feel free to contact us for any query and concern, we will be more than happy to extend our support.

Best Regards,