You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Petras (JIRA)" <ji...@apache.org> on 2016/02/17 12:10:18 UTC
[jira] [Created] (PDFBOX-3235) ColorSpace validation fails for
inlined image
Petras created PDFBOX-3235:
------------------------------
Summary: 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
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