You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2016/02/17 18:33:18 UTC

[jira] [Comment Edited] (PDFBOX-3235) ColorSpace validation fails for inlined image

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

Tilman Hausherr edited comment on PDFBOX-3235 at 2/17/16 5:32 PM:
------------------------------------------------------------------

We're not really doing any refactoring in 1.8, only fixing bugs, when easily possible. So it could be that you open another issue for 1.8 and it won't be fixed. (For example, many Bavaria test suite files are not getting analyzed correctly in 1.8)


was (Author: tilman):
We're not really doing any refactoring in 1.8, only fixing bugs, when easily possible. So it could be that you open another issue and it won't be fixed. (For example, many Bavaria test suite files are not getting analyzed correctly)

> 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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org