[ 
https://issues.apache.org/jira/browse/PDFBOX-3235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152204#comment-15152204
 ] 

Tilman Hausherr commented on PDFBOX-3235:
-----------------------------------------

What we had before is that a very common type of correct PDF/A file would be 
seen as bad in 1.8 only. What we (possibly) have now is that some incorrect 
file that we haven't seen yet would be considered to be correct. Your proposed 
fix can't be used for 2.0 because the enum names were already different.

What we'd need now is an incorrect file that passes (I could create that 
later), a new issue should be opened for this. Hopefully the fix will be the 
same for 1.8 and 2.0.

> ColorSpace validation fails for inlined image
> ---------------------------------------------
>
>                 Key: PDFBOX-3235
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3235
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Preflight
>    Affects Versions: 1.8.11
>            Reporter: Petras
>         Attachments: FIX__ColorSpaces_for_inlined_image.patch
>
>
> Validation fails for inlined image if content stream for inline image 
> specifies color space using abbreviated name (ex. */CMYK* instead of 
> */DeviceCMYK*):
> {quote}
> BI
> /CS/CMYK
> /W 34
> /H 36
> /BPC 8
> /F/Fl
> /DP<</Predictor 15
> /Columns 34
> /Colors 4>>
> ID x£ĒŚ...
> EI
> {quote}
> In this case Preflight validation fails with this message:
> {quote}
> 2.3.2 : Unexpected key in Graphic object definition, The ColorSpace is unknown
> {quote}
> PDF Reference v1.4 Chapter 4.8.6 table 4.40 indicates the abbreviations for 
> the names of color spaces, which could be used to represent color spaces for 
> inlined images instead of using the full names. There abbreviation *CMYK* 
> matches full name *DeviceCMYK*.
> The culprit is that {{ContentStreamEngine}} looks for the corresponding 
> {{ColorSpaces}} enum constant by matching its name to the specified color 
> space name in content stream (i.e. using {{Enum.valueOf()}}).  While 
> {{ColorSpaces}} enum class has constants for abbreviated names, they are 
> stored in local variable {{label}} and do not correspond to the enum constant 
> name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to