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

Wrong color space used for DeviceN operator without color space specified

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.7.0
    • Component/s: PDModel, Swing GUI
    • Labels:
      None

      Description

      I have a PDF that uses a DeviceN color space, but when using the PDFToImage utility I noticed that some of the text comes out as cyan.

      I tracked the issue down to when the scn or SCN operator is used without setting the color space explicitly (ie using the current color space). I have attached a patch which resolves the issue by reinstating the original (DeviceN) color space after using the alternate color space, otherwise the alternate color space (in this case CMYK) was seen as the current color space and the attribute of 1 for the scn operator, which was meant for the DeviceN color space, is used in the CMYK color space resulting in the cyan.

      I have also attached an example PDF and the result for the PDFToImage conversion.

        Attachments

        1. test4.pdf-1.png
          13 kB
          Simon Maskell
        2. test4.pdf
          20 kB
          Simon Maskell
        3. DeviceN.patch
          3 kB
          Simon Maskell

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              simonmazer Simon Maskell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: