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

Some feature of the given JPEG leads to erroneous results, when adding (drawing) it to a PDPageContentStream.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.9
    • Fix Version/s: None
    • Component/s: Writing
    • Labels:
      None

      Description

      Some feature of the given JPEG leads to erroneous results, when adding (drawing) it to a PDPageContentStream.

      The document itself is created just fine and the page is displayable in the "PDF Debugger" application, but for example the Adobe Reader is reporting an "internal Error", when opening the created PDF.

      Reproducable via:

      try(PDDocument document = new PDDocument()){
       PDPage page = new PDPage();
       try(PDPageContentStream pcs = new PDPageContentStream(document, page)){
          PDImageXObject pdImage = PDImageXObject.createFromFile("path to jpeg", document);
          pcs.drawImage(pdImage, 30, 30);
       }
      
       document.addPage(page);
       document.save(new File("output file"));
      }

        Attachments

        1. itext.pdf
          88 kB
          Tilman Hausherr
        2. UsingAdobeDC.pdf
          97 kB
          CAP
        3. image-2018-09-14-09-15-40-860.png
          10 kB
          CAP
        4. image-2018-09-14-09-14-45-358.png
          8 kB
          CAP
        5. image-2018-09-14-09-13-56-216.png
          8 kB
          CAP
        6. out.pdf
          88 kB
          CAP
        7. IMG-20180719-WA0000.jpg
          87 kB
          CAP

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              CAP-Softvision CAP
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: