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/04/02 00:03:52 UTC
[jira] [Resolved] (PDFBOX-2741) IndexOutOfBoundsException when
calling PDSeparation.setAlternateColorSpace
[ https://issues.apache.org/jira/browse/PDFBOX-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-2741.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.8.10
> 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
> Labels: Separation
> Fix For: 1.8.10
>
>
> 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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org