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

CLONE -convertToImage seems to invert colors

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0-incubator, 1.0.0, 1.2.0, 1.3.1
    • Fix Version/s: 1.6.0
    • Component/s: Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The pdfbox support team asked me to post this message on this forum so attachments could be seen

      I have a pdf document that has a white background with black text. It
      appears after I make the call to convertToImage the colors are reversed. A
      black background with white text

      pdDocument = PDDocument.load(new ByteArrayInputStream(aContent));
      List<PDPage> documentPageList = pdDocument.getDocumentCatalog().getAllPages();
      for(int i=0; i<documentPageList.size(); ++i) {
      PDPage aPage = documentPageList.get;
      for (int x=1; x < 14; x++) {
      BufferedImage tempImage = convertToImage(x, (2 * 72),aPage);
      ImageIO.write(tempImage,"jpeg", new File("c:
      tmp
      page-" + x + ".jpeg"));
      }
      }

        Attachments

        1. tast_bb.pdf
          149 kB
          Roland Quast

          Issue Links

            Activity

              People

              • Assignee:
                lehmi Andreas Lehmkühler
                Reporter:
                rquast Roland Quast
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: