Tilman Hausherr created PDFBOX-2819:
---------------------------------------
Summary: invalid ICC Profile when reading from a byte array
Key: PDFBOX-2819
URL: https://issues.apache.org/jira/browse/PDFBOX-2819
Project: PDFBox
Issue Type: Bug
Components: Preflight
Affects Versions: 1.8.9, 1.8.10, 2.0.0
Environment: W7
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Fix For: 1.8.10, 2.0.0
6-1-12-t02-fail-a.pdf has 4 extra fails, that are related to an "invalid" ICC
profile. "Invalid" meaning that ICC_Profile.getInstance() fails. Funny thing is
that it works when reading from a stream. The following code shows this:
{code}
FileInputStream fis = new FileInputStream(new File("veraPDF test suite
6-1-12-t02-fail-a.icc"));
ICC_Profile instance = ICC_Profile.getInstance(fis);
fis.close();
File iccFile;
FileInputStream fis2 = new FileInputStream(iccFile = new File("veraPDF
test suite 6-1-12-t02-fail-a.icc"));
byte[] iccBuf = new byte[(int) iccFile.length()];
fis2.read(iccBuf);
ICC_Profile instance2 = ICC_Profile.getInstance(iccBuf); // exception
fis2.close();
{code}
That is a java bug :-(
So I'll have to replace the calls in preflight accordingly. It doesn't apply to
the main pdfbox project.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]