Summary: | Errors (ICC) when processing pdf file | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Sasa Friedrich <sasa.friedrich> |
Component: | General | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 9.18 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | test file used by ghostscript |
Description
Sasa Friedrich
2016-10-20 04:14:08 UTC
Well, fundamentally your PDF file is broken. It uses ICCBased colour spaces, and the number of declared components in the colour space doesn't match the actual content of the ICC profile.
Eg:
516 0 obj
<<
/N 1
/Length 1200
>>
stream
But the stream contents indicate this is an RGB ICC profile.
So which should we use ?
Previously we would throw away the profile and use the number of components to select a device profile. Clearly this won't be correct because a 3-component ICC colour space need not be RGB.
Now we ignore the number of components in the colour space definition and use the actual ICC profile instead. However, if the ICC profile should turn out to be illegal, we still fall back to the number of components.
At least some of the profiles embedded in your PDF file apparently aren't legal. causing this behaviour, others appear like they might be legal, but result in invalid colours.
Note that opening your file with Adobe Acrobat (which is well known for ignoring errors in PDF files) results in an error on page2.
It 'looks like' the reason this 'worked' with old versions of Ghostscript is simply because they didn't use the ICC profiles at all. They just used the number of components in the colour space definition and hoped for the best. In short your file was rendered incorrectly previously, but it was 'close enough' so you didn't notice there was a problem.
Now we do use the ICC profiles, and so your PDF file is revealed as broken.
I notice that the PDF creating application is apparently too embarrassed even to put its name in the Info dictionary.
Where is a bug here, but its not in Ghostscript.
(In reply to Ken Sharp from comment #1) > It 'looks like' the reason this 'worked' with old versions of Ghostscript is > simply because they didn't use the ICC profiles at all. They just used the > number of components in the colour space definition and hoped for the best. > In short your file was rendered incorrectly previously, but it was 'close > enough' so you didn't notice there was a problem. > > Now we do use the ICC profiles, and so your PDF file is revealed as broken. > Is there a way to force GS to process file in "old way" (ignore ICC profiles)? (In reply to Sasa Friedrich from comment #2) > Is there a way to force GS to process file in "old way" (ignore ICC > profiles)? No. |