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

PDPage convertToImage partially generates image file and throws exception

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 1.8.0
    • PDModel

    Description

      Converting a PDPage to an image results in an image file only being partially generated. Some text at the top of the file is created, but the majority of the page is not and an exception is thrown:
      [ERROR] java.io.IOException: Unknown stream filter:COSName

      {JBIG2Decode}
      java.io.IOException: Unknown stream filter:COSName{JBIG2Decode}

      at org.apache.pdfbox.filter.FilterManager.getFilter(FilterManager.java:103)
      at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:249)
      at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:221)
      at org.apache.pdfbox.cos.COSStream.getUnfilteredStream(COSStream.java:156)
      at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:211)
      at org.apache.pdfbox.pdmodel.common.PDStream.getByteArray(PDStream.java:465)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:141)
      at org.apache.pdfbox.util.operator.pagedrawer.Invoke.process(Invoke.java:74)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:567)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:250)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:208)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:112)
      at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:718)
      at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:689)

      Is JBIG2Decode not a supported COSStream encoding?

      Attachments

        1. b.pdf
          36 kB
          Dan Sabin
        2. b.png
          10 kB
          Dan Sabin

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lehmi Andreas Lehmkühler
            dsabin Dan Sabin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment