Reis Markus wrote:
> Hi,
> 
> Is it possible to add information/metadata to a PDF document that tell a 
> printer that it should print the PDF document duplex?

That was introduced in PDF 1.7.
(So it will only work starting with Adobe Reader 8.)

> If yes, could this be done via iText?

Choose one of these options:
writer.addViewerPreference(PdfName.DUPLEX, PdfName.SIMPLEX);
writer.addViewerPreference(PdfName.DUPLEX, PdfName.DUPLEXFLIPSHORTEDGE);
writer.addViewerPreference(PdfName.DUPLEX, PdfName.DUPLEXFLIPLONGEDGE);
where writer is your PdfWriter instance.

For more info read the PDF Reference page 580:
"Duplex name (Optional; PDF 1.7) The paper handling option to use when
printing the file from the print dialog. The following values are valid:
     Simplex - Print single-sided
     DuplexFlipShortEdge - Duplex and flip on the short edge of the sheet
     DuplexFlipLongEdge - Duplex and flip on the long edge of the sheet
Default value: none"

-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to