Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3863

Support duplex entry in ViewerPreferences

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.6
    • 2.0.7, 3.0.0 PDFBox
    • PDModel
    • None

    Description

      The attached SO question inspired me to support the duplex entry in ViewerPreferences, even if it isn't what the person asked for. Adobe Reader supports it, i.e. their print dialog changes depending on the entry.

      To test this feature, create a PDF with 2 pages and use this code:

      PDDocumentCatalog documentCatalog = document.getDocumentCatalog();
      PDViewerPreferences viewerPreferences = new PDViewerPreferences(new COSDictionary());
      viewerPreferences.setDuplex(PDViewerPreferences.DUPLEX.DuplexFlipShortEdge);
      documentCatalog.setViewerPreferences(viewerPreferences);
      

      This will show the calender duplex mode in the print dialog.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: