[
https://issues.apache.org/jira/browse/PDFBOX-3235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151838#comment-15151838
]
Petras edited comment on PDFBOX-3235 at 2/18/16 8:39 AM:
---------------------------------------------------------
The bug I reported was that Preflight didn't considered the abbreviated form of
color space names. My suggested fix was to solve this while keeping the current
set of names (without abbreviated forms) in other contexts. The alignment with
v2.0 introduces the abbreviated forms to other contexts, despite the fact, that
abbreviated forms are not allowed there. Why do you think such an alignment is
more preferable solution of the reported issue, why not to propagate the
suggested fix to v2.0?
was (Author: abyss):
The bug I reported was that Preflight didn't considered the abbreviated form of
color space names. My suggested fix was to solve this while keeping the current
set of names (without abbreviated forms) in other contexts. The alignment with
v2.0 introduces the abbreviated forms to other contexts, despite the fact, that
abbreviated forms are not allowed there. Why do you think the alignment is more
preferable solution of the reported issue?
> 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]