Tilman Hausherr created PDFBOX-2741:
---------------------------------------
Summary: IndexOutOfBoundsException when calling
PDSeparation.setAlternateColorSpace
Key: PDFBOX-2741
URL: https://issues.apache.org/jira/browse/PDFBOX-2741
Project: PDFBox
Issue Type: Bug
Components: PDModel
Affects Versions: 1.8.9, 1.8.10
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
>From Floris in the user mailing list:
I am trying to define a Separation color space but get the following error
message if I try to run the program posted beneath. The error seems to be quite
local; coming only from the setAlternateColorSpace. What is going on here? I am
using org.apache.pdfbox:pdfbox:app-1.8.10-20150327.210556-4 (in this version
DeviceN is working) and java version 1.8.0_40-ea.
{code}
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 2, Size:
2
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.set(ArrayList.java:444)
at org.apache.pdfbox.cos.COSArray.set(COSArray.java:148)
at
org.apache.pdfbox.pdmodel.graphics.color.PDSeparation.setAlternateColorSpace(PDSeparation.java:182)
at com.here.devicentest.DeviceNTest.WriteSeprationPDF(DeviceNTest.java:463)
at com.here.devicentest.DeviceNTest.main(DeviceNTest.java:43)
{code}
The cause is this initialisation:
{code}
public PDSeparation()
{
array = new COSArray();
array.add( COSName.SEPARATION );
array.add( COSName.getPDFName( "" ) );
}
{code}
However the separation colorspace has 4 elements.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]