Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter or Blend not applied correctly. #6951

Open
richerm opened this issue Feb 2, 2016 · 7 comments
Open

Filter or Blend not applied correctly. #6951

richerm opened this issue Feb 2, 2016 · 7 comments

Comments

@richerm
Copy link

richerm commented Feb 2, 2016

I am experiencing an issue where a particular filter or gradient is not being correctly applied. In the attached document the 'o' in Imodium in Adobe Reader shows a lighter blue swirled into the darker blue. In PDF.JS this appears as a light blue to grey to dark blue.

Tested on Win7&Win10-Firefox 43.0.4 with built-in viewer.
Tested on Win7&Win10-Chrome 48.0.2564.97 m + Firefox 43.0.4.
Also tested with Chrome's built-in viewer which also failed but not relevant here.

PDF 110dd61fd57444010b1ab5ff38782f0f [1.4 pdfeTeX-1.21a / TeX](PDF.js: 1.4.37)
PDF 20f7e4cdf6834d508060b9490960c9bb [1.4 Adobe PDF library 10.01 / Adobe Illustrator CS6 (Macintosh)](PDF.js: 1.4.37)

Please find a simplified example attached:
ImoLogo.pdf

comparison

@yurydelendik
Copy link
Contributor

Also the same issue with Mac OSX Preview

@SamyCookie
Copy link

Failed also with Firefox 44 and chromium 38 on Debian systems.

edit: ... and fails also with Okular

@richerm
Copy link
Author

richerm commented Feb 2, 2016

Also confirmed GhostScript fails at it, NitroPdf, and handful of other converters/rendering to image tools. Seems pretty widespread which is quite perplexing.

@yurydelendik
Copy link
Contributor

The PDF contains really complex function-based shading type 2 with custom/function-based two component colorspace. What can go wrong? :)

screen shot 2016-02-02 at 11 44 34 am

@richerm
Copy link
Author

richerm commented Feb 2, 2016

@yurydelendik Looks complicated just looking at it :).

Is there recommendations I should be providing upstream to avoid this other then 'don't use functions on functions to perform shading'?

Is this something that will be looked at, or due to the complexity dropped in priority?

Aside: What tool do you use to dissect the PDF like the screenshot above? I've been using Notepad++ which obviously doesn't decode the streams for me or make it like hierarchical like yours.

@yurydelendik
Copy link
Contributor

http://brendandahl.github.io/pdf.js.utils/browser/

Not sure if the generator "Adobe Illustrator CS6 (Macintosh)" has different method of generating the same image/result.

@THausherr
Copy link
Contributor

IMHO it is related whether one uses the separation colors directly in the DeviceN colorspace (which is what PDFBox does and gets a nice rendering for this file but not for another), or use the AlternateCS and tintTransform parameters (which is what PDF.js and GS do, and don't get a nice rendering for this file). See also https://issues.apache.org/jira/browse/PDFBOX-5074

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants