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

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

I hae attached the file PDFA-RGB.pdf which contains a short colorspace in a 
normal file. Feel free to submit a patch... That file is identified as bad in 
2.0, but not in 1.8, neither with my own change nor with yours.

> 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
>             Fix For: 1.8.12
>
>         Attachments: FIX__ColorSpaces_for_inlined_image.patch, PDFA-RGB.pdf
>
>
> 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: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to