[
https://issues.apache.org/jira/browse/PDFBOX-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14132779#comment-14132779
]
Andreas Lehmkühler commented on PDFBOX-2234:
--------------------------------------------
The whole validation process starts in PreflightDocument#validate by iterating
over all process validators (process map) and it's obvious that the order is
important. IMHO it works by accident for java <= 7 by doesn't for java 8.
I'm not sure about the reason. If we have to use a specific order because of
the structure of the pdf or if it's because of the implementation as John
assumes, maybe it's a combination of both.
However, I guess to use a ListMap instead of a HashMap is a valid patch and yes
there are a lot of oppertunities to improve the preflight code.
> [PATCH] Invalid Color space preflight error on Java 8
> -----------------------------------------------------
>
> Key: PDFBOX-2234
> URL: https://issues.apache.org/jira/browse/PDFBOX-2234
> Project: PDFBox
> Issue Type: Bug
> Components: Preflight
> Affects Versions: 1.8.6, 1.8.7, 2.0.0
> Reporter: simon steiner
> Labels: JDK1.8
> Fix For: 1.8.7, 2.0.0
>
> Attachments: expected.pdf, pdfavalidationjava8.patch
>
>
> java -cp
> pdf-box-svn/preflight/target/preflight-2.0.0-SNAPSHOT.jar:pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar:pdf-box-svn/xmpbox/target/xmpbox-2.0.0-SNAPSHOT.jar:lib/commons-io-1.3.1.jar
> org.apache.pdfbox.preflight.Validator_A1b expected.pdf
> Java 7:
> The file expected.pdf is a valid PDF/A-1b file
> Java 8:
> The fileexpected.pdf is not valid, error(s) :
> 2.4.3 : Invalid Color space, The operator "G" can't be used without Color
> Profile
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)