You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Andrea Vacondio <an...@gmail.com> on 2015/08/04 17:30:27 UTC

Should PDColor toCOSArray include the pattern name?

Hi, this is somehow related to
https://issues.apache.org/jira/browse/PDFBOX-2830
the PDColor::toCOSArray method adds the pattern name (if present) to the
end of the array but as far as I can tell from the spec it shouldn't. The
C, BC and IC description says something like "An array of numbers that
shall be in the range 0.0 to 1.0 and shall specify ..bla bla... The number
of array elements determines the colour space in which the colour shall be
defined".
Am I correct?

Re: Should PDColor toCOSArray include the pattern name?

Posted by John Hewson <jo...@jahewson.com>.
Those entries don’t support pattern color spaces, so that’s only an issue if the user is doing something invalid. PDColor represents *any* color, including pattern colors. It’s certainly possible for C, BC, and IC setters to first verify the color space to catch such a user error, if needed.

— John

> On 4 Aug 2015, at 08:30, Andrea Vacondio <an...@gmail.com> wrote:
> 
> Hi, this is somehow related to
> https://issues.apache.org/jira/browse/PDFBOX-2830
> the PDColor::toCOSArray method adds the pattern name (if present) to the
> end of the array but as far as I can tell from the spec it shouldn't. The
> C, BC and IC description says something like "An array of numbers that
> shall be in the range 0.0 to 1.0 and shall specify ..bla bla... The number
> of array elements determines the colour space in which the colour shall be
> defined".
> Am I correct?


Re: Should PDColor toCOSArray include the pattern name?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 04.08.2015 um 17:30 schrieb Andrea Vacondio:
> Hi, this is somehow related to
> https://issues.apache.org/jira/browse/PDFBOX-2830
> the PDColor::toCOSArray method adds the pattern name (if present) to the
> end of the array but as far as I can tell from the spec it shouldn't. The
> C, BC and IC description says something like "An array of numbers that
> shall be in the range 0.0 to 1.0 and shall specify ..bla bla... The number
> of array elements determines the colour space in which the colour shall be
> defined".
> Am I correct?
>

The problem is that the color is also used for the scn operator, where a 
pattern is needed.

You are correct if you mean that it might be possible to pass a 
patterned colorspace to a C / BC / IC description.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org