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

Printing pages rotated by 180 degrees is not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 2.0.0
    • Rendering
    • None

    Description

      I'm trying to parse a PDF document, rotate all of it's pages by 180 degrees and then print the document. The page rotation is ignored when printing but does rotate correctly if the document is saved to disk.

      PDFParser parser = new PDFParser(new FileInputStream(new File("testdata/myfile.pdf")));
      parser.parse();
      PDDocument pdDocument = parser.getPDDocument();
      for (Object page : pdDocument.getDocumentCatalog().getAllPages()) {
      if (page instanceof PDPage)

      { ((PDPage) page).setRotation(180); }

      }

      pdDocument.silentPrint(job);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              toastshaman Kevin Denver
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: