You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2015/10/29 19:11:27 UTC
[jira] [Commented] (PDFBOX-3070) Incorrect DefaultRGB color space
obtain
[ https://issues.apache.org/jira/browse/PDFBOX-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980937#comment-14980937 ]
John Hewson commented on PDFBOX-3070:
-------------------------------------
There's no reason to set the DefaultCMYK to DeviceCMYK, because DeviceCMYK is already the default CMYK color space. Also, you can simply the above code:
{code}
PDResources resources = new PDResources();
page.setResources(resources);
resources.put(COSName.DEFAULT_CMYK, PDDeviceCMYK.INSTANCE);
{code}
But as I've said, there's no point in actually having this code. That said, _we should still fix this bug_.
> Incorrect DefaultRGB color space obtain
> ---------------------------------------
>
> Key: PDFBOX-3070
> URL: https://issues.apache.org/jira/browse/PDFBOX-3070
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Evgeniy Muravitskiy
> Fix For: 2.1.0
>
> Attachments: Fix_cycled_default_color_space.patch
>
>
> I got StackOverflowException for following code:
> {code}
> COSDictionary resourcesDict = new COSDictionary();
> COSDictionary colorSpacesDict = new COSDictionary();
> colorSpacesDict.setItem(COSName.DEFAULT_CMYK, COSName.DEVICECMYK);
> resourcesDict.setItem(COSName.COLORSPACE, colorSpacesDict);
> PDResources resources = new PDResources(resourcesDict);
> resources.getColorSpace(COSName.DEFAULT_CMYK);
> {code}
> {{PDColorSpace.create(COSBase, PDResources)}} ignore possible cycle Default -> Device -> Default - > Device -> ......
--
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