You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Petr Slaby (JIRA)" <ji...@apache.org> on 2014/07/02 15:23:25 UTC
[jira] [Created] (PDFBOX-2176) Ignore IllegalArgumentException when
reading an ICCProfile
Petr Slaby created PDFBOX-2176:
----------------------------------
Summary: Ignore IllegalArgumentException when reading an ICCProfile
Key: PDFBOX-2176
URL: https://issues.apache.org/jira/browse/PDFBOX-2176
Project: PDFBox
Issue Type: Bug
Components: PDModel, Rendering
Affects Versions: 2.0.0
Reporter: Petr Slaby
Priority: Minor
Attachments: 000049.pdf
A "java.lang.IllegalArgumentException: Invalid ICC Profile Data" is thrown from PDICCBase#loadICCProfile() when rendering the attached PDF. The code already checks for and ignores ProfileDataException and CMMException at this place.
IllegalArgumentException is thrown if the profile header data is completely corrupt, either there is not even the 128 header bytes or the profile size found in header does not match the size of data.
The exception is ignored in 1.8, in 2.0 it is re-thrown. I think ignoring the exception and using an alternate color space is better and consistent with the handling of the other two expected exceptions.
--
This message was sent by Atlassian JIRA
(v6.2#6252)