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

Colors inaccurate rastered CMYK source w/ gradient + photo

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • Rendering
    • None
    • Tested on OS X 10.10, Java 1.6 / 1.8

    Description

      In the attached gradient-test-photo.pdf, there's a photo with a gradient on top of it. The colors in the gradient are CMYK. When rasterizing this test file with PDFBox 2.0.0 SNAPSHOT 20150209, the resulting image's gradient is different from the original and the colors of the photo under the gradient look significantly different vs the display in Adobe tools like Illustrator or other compliant PDF readers.

      Issues:

      • Color hue is wrong. Is this a CMYK to RGB issue?
      • Opacity of gradient is wrong and much different. The jpg from Illustrator shows much more of the photo without a gradient over it.

      Without a photo, there's still a difference, but it's much harder to see. Example in gradient-test.pdf where the same gradient is drawn over a grey rectangle.

      If I convert the PDF to RGB in Illustrator first and rasterize the RGB PDF with PDFBox, the result is nearly identical between Illustrator and PDFBox so this seems like a CMYK conversion issue in both the general color conversion and maybe how the gradient is calculated.

      Attachments

        1. acrobat-vs-pdfbox-swop.png
          720 kB
          John Hewson
        2. gradient-test.pdf
          27 kB
          Jon Wu
        3. gradient-test-illustrator.jpg
          136 kB
          Jon Wu
        4. gradient-test-pdfbox.jpg
          247 kB
          Jon Wu
        5. gradient-test-photo.pdf
          88 kB
          Jon Wu
        6. gradient-test-photo-illustrator.jpg
          317 kB
          Jon Wu
        7. gradient-test-photo-pdfbox.jpg
          782 kB
          Jon Wu
        8. gradient-test-photo-pdfbox-us-web-coated-swop-v2.jpg
          785 kB
          Jon Wu
        9. gradient-test-photo-rgb.pdf
          102 kB
          Jon Wu
        10. gradient-test-photo-rgb-illustrator.jpg
          297 kB
          Jon Wu
        11. gradient-test-photo-rgb-pdfbox.jpg
          766 kB
          Jon Wu
        12. photo-rectangle-overlay-opacity-30.pdf
          227 kB
          Jon Wu
        13. photo-rectangle-overlay-opacity-30-photoshop-comparison.jpg
          344 kB
          Jon Wu
        14. purple-gradient-comparison.jpg
          23 kB
          Jon Wu
        15. Shading2Function2CMYK.pdf
          3 kB
          Tilman Hausherr
        16. Shading2Function2CMYK.ps
          0.4 kB
          Tilman Hausherr

        Activity

          People

            Unassigned Unassigned
            jon_wu Jon Wu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: