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

java.io.IOException: Expected a name or array but got: COSObject{1823, 0}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Parsing
    • None

    Description

      I get this with the attached file:

      04.07.2014 19:20:59.356 ERROR [main] org.apache.pdfbox.pdmodel.PDResources:329 - error while creating a colorspace
      java.io.IOException: Expected a name or array but got: COSObject{1823, 0}
      	at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:162)
      	at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:55)
      	at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:145)
      	at org.apache.pdfbox.pdmodel.PDResources.getColorSpaces(PDResources.java:325)
      	at org.apache.pdfbox.util.operator.SetNonStrokingColorSpace.process(SetNonStrokingColorSpace.java:44)
      	at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:499)
      	at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:264)
      	at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:223)
      	at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:199)
      	at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:183)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:228)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:160)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:109)
      	at pdfboxziptest.PDFBoxZipTest.doPdf(PDFBoxZipTest.java:101)
      	at pdfboxziptest.PDFBoxZipTest.main(PDFBoxZipTest.java:72)
      

      In the PDF:

      36 0 obj
      [ 
      /Pattern 1823 0 R 
      ]
      endobj
      
      1823 0 obj
      [ 
      /ICCBased 1851 0 R 
      ]
      endobj
      

      I assume that it is indeed a syntax error, but I don't really get how it should have been done, and whether it can be fixed.

      Attachments

        1. 000-000324.pdf
          441 kB
          Tilman Hausherr

        Activity

          People

            Unassigned Unassigned
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: