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

ColorSpace with empty Range array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.4, 1.8.5, 2.0.0
    • 1.8.5, 2.0.0
    • PDModel
    • None

    Description

      I have PDF document where I am modifying PDPage content stream.
      Saved document is invalid (Adobe reader complains about it).

      I have narrowed it down to ColorSpace.

      Original document has colorspace:
      /ColorSpace <<
      /Cs6 [/ICCBased <<
      /Alternate /DeviceRGB
      /Filter /FlateDecode
      /Length 2597
      /N 3
      >>]>>

      Modified document has colorspace:
      /ColorSpace <<
      /Cs6 [/ICCBased <<
      /Alternate /DeviceRGB
      /Filter /FlateDecode
      /Length 2597
      /N 3
      /Range []
      >>]>>

      When I manually remove "/Range []" from PDF then Adobe reader opens it without an error.

      Obviously that range is added by calling PDICCBased.getRangeArray(0) somewhere.

      Attachments

        1. ModifyTest.java
          12 kB
          Juraj Lonc
        2. pdfbox18.pdf
          153 kB
          Juraj Lonc
        3. pdfbox20.pdf
          153 kB
          Juraj Lonc

        Activity

          People

            tilman Tilman Hausherr
            chupacabras Juraj Lonc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: