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

Exception thrown during rendering page if /DecodeParms specified indirectly (like [9 0 R]) in XObject/Image

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0, 1.7.1
    • Fix Version/s: 1.8.0
    • Component/s: PDModel
    • Environment:
      Not important

      Description

      PROBLEM:
      Exception is thrown during rendering TC11.pdf. Empty image is generated.

      TEST:
      java -jar pdfbox-app-1.7.1.jar PDFToImage -resolution 300 TC11.pdf

      DETAILS:
      There are 2 objects in TC11.pdf.
      . . .
      Object 7:
      <<

      /Type /XObject
      /Subtype /Image
      /Width 2496
      /Height 3504
      /BitsPerComponent 1
      /ColorSpace /DeviceGray
      /Filter [/CCITTFaxDecode]
      /DecodeParms [9 0 R]
      /Length 10 0 R
      >>
      . . .
      Object 9:
      <<

      /Columns 2496
      /Rows 3504
      /K -1
      /BlackIs1 false
      >>
      . . .

      when rendering the page exception is thrown as the library doesn't resolve indirect reference to object 9 for /DecodeParms.

      RESOLUTION:
      I can specify what is to be changed in CCITTFaxDecoderFilter.java and PDCcitt.java to resolve the issue.

        Attachments

        1. PDCcitt.java
          27 kB
          Alexey Gavrilov
        2. CCITTFaxDecodeFilter.java
          5 kB
          Alexey Gavrilov
        3. Exception info.jpg
          319 kB
          Alexey Gavrilov
        4. TC11.pdf
          8 kB
          Alexey Gavrilov

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              alg Alexey Gavrilov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: