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 2015/01/31 19:24:34 UTC
[jira] [Resolved] (PDFBOX-2636) Colorspaces of annotations not
treated correctly
[ https://issues.apache.org/jira/browse/PDFBOX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-2636.
-------------------------------------
Resolution: Fixed
> Colorspaces of annotations not treated correctly
> ------------------------------------------------
>
> Key: PDFBOX-2636
> URL: https://issues.apache.org/jira/browse/PDFBOX-2636
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing, Preflight
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Fix For: 2.0.0
>
>
> I get this exception with preflight
> {code}
> java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.elementData(Unknown Source)
> at java.util.ArrayList.get(Unknown Source)
> at org.apache.pdfbox.cos.COSArray.get(COSArray.java:210)
> at org.apache.pdfbox.pdmodel.graphics.color.PDColor.<init>(PDColor.java:48)
> at org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.getColor(PDAnnotation.java:647)
> at org.apache.pdfbox.preflight.annotation.AnnotationValidator.checkColors(AnnotationValidator.java:133)
> {code}
> at first, it looks like a regression by PDFBOX-2629 but the code was never correct even before: the "C" (and IC, BC, BG) property of annotations can have different colorspaces or none:
> {quote}
> An array of numbers in the range 0.0 to 1.0, representing a colour used for the following purposes: (...)
> The number of array elements determines the colour space in which the colour shall be defined:
> 0 No colour; transparent
> 1 DeviceGray
> 3 DeviceRGB
> 4 DeviceCMYK
> {quote}
> The same problem exists for the IC and BC items of an annotation.
> [~msahyoun] - could you please look whether PDF/A-1b has a requirement that only RGB is allowed for annotations? In ordinary PDF, Gray, RGB, CMYK or None are allowed, but currently PDFBox Preflight forbids CMYK or Gray, instead of checking that the output intent matches the color space. I've also read that DeviceGray accepts an RGB or CMYK icc profile.
> http://www.pdfa.org/2011/09/pdfa-und-farbe/?lang=de#zugelassene_farbraeume
--
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