PDF Facades & PDFViewer

I am trying to use the Aspose.PDF.Facades to generate a PDF with fields filled in. This I have working (see code below). My problem comes when I try to print the resulting PDF using PDFViewer. My input PDF is 2 pages and is set within that form to be duplex. When I print it with the code below - I get 2 separate pages - the first page has the field (as a barcode) on it - the barcode does not print. Page 2 looks just fine-except that it should be on the back side of page 1. Also - if I open the resulting PDF with Adobe Reader and print it - all prints fine (the data field is filled in and printed and it prints front and back).

Thanks

Code to generate the PDF.
Dim pdf2 As New Aspose.Pdf.Facades.Form
pdf2.BindPdf(“c:\it\wcstestaspose\CSS Response Static.pdf”)
pdf2.FillField(“form1.bcCCSNumber”, “123123”)
pdf2.Save(“c:\it\wcstestaspose\output.pdf”)

Code to Print PDF
Dim viewer As New PdfViewer()
viewer.BindPdf" c:\it\wcstestaspose\output.pdf")

    viewer.AutoResize = True 'Print the file with adjusted size
    viewer.AutoRotate = True 'Print the file with adjusted rotation
    viewer.PrintPageDialog = False 'Do not produce the page number dialog when printing
    
    'Create objects for printer and page settings and PrintDocument
    Dim ps As New System.Drawing.Printing.PrinterSettings()
    MsgBox(ps.CanDuplex) '- this returns True
    Dim pgs As New System.Drawing.Printing.PageSettings()
    Dim prtdoc As New System.Drawing.Printing.PrintDocument()

    ps.PrinterName = prtdoc.PrinterSettings.PrinterName

   ps.Duplex = True

    'Print document using printer and page settings
    viewer.PrintDocumentWithSettings(pgs, ps)

    viewer.Close()

Hi Todd,


Thanks for contacting support.

Please share the resource PDF document (which you are trying to print), so that we can test the scenario in our environment. We are sorry for this inconvenience.

Here is the original PDF.

Hi Todd,


Thanks for sharing your source PDF. We have tested the scenario at our end and noticed the barcode on first page is not being printed. So we have logged a ticket PDFNEWNET-38450 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

Moreover, in reference to duplex printing mode, please use Duplex.default value for Duplex property as following. Hopefully it will resolve the issue.

…<o:p></o:p>

ps.Duplex = Duplex.Default 'Print document using printer and page settings

....


Best Regards,