Hi

I’m trying to set duplex printing in a pdf that’s created using iTextSharp in VB.

The code I'm using is below. When I open the resulting PDF the version is set to Adobe 8, but clicking on the Advanced tab in the Properties window shows that it is only set to simplex printing.

I've tried setting the duplex option while the document is open aswell, but it doesn't make any difference.

There doesn't seem to be a SetViewerPreferences method in the iTextSharp implementation.

Also is it possible to set the paper type or paper tray of the printer within the pdf?

Can anyone help me please?? Thanks

      'Create an instance of document object
      PDFDoc = New Document(PageSize.A4)

'Create a writer that listens to this doucment and writes the document to desired Stream. Writer = PdfWriter.GetInstance(PDFDoc, New FileStream(PDFFileName, FileMode.Create))

      'Set the PDF Version
      Writer.SetPdfVersion(PdfWriter.PDF_VERSION_1_7)

      'Set duplex printing
Writer.AddViewerPreference(PdfName.DUPLEX, PdfName.DUPLEXFLIPLONGEDGE)

      'Open the document
      PDFDoc.Open()

     '<<Add some content >>

      'Close the document
      PDFDoc.Close()

_________________________________________________________________
Got a favourite clothes shop, bar or restaurant? Share your local knowledge http://www.backofmyhand.com


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to