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/03/28 12:56:53 UTC

[jira] [Comment Edited] (PDFBOX-2734) Can't create PDF with DeviceN colorspace

    [ https://issues.apache.org/jira/browse/PDFBOX-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384700#comment-14384700 ] 

Tilman Hausherr edited comment on PDFBOX-2734 at 3/28/15 11:56 AM:
-------------------------------------------------------------------

[~jahewson] Do you remember why you removed setAlternateColorSpace() and setTintTransform() in PDDeviceN in PDFBOX-1893 / rev 1570086, but kept setColorantNames() and setAttributes() in the trunk? It means we have two "easier to understand" methods, but these are worthless if we don't have the other two. To create a DeviceN colorspace, the user would have to pass a fully initialized COSArray to the constructor, instead of constructing an empty object and initialize it later (as is favoured e.g. in the spring framework).


was (Author: tilman):
[~jahewson] Do you remember why you removed setAlternateColorSpace() and setTintTransform() in PDDeviceN, but kept setColorantNames() and setAttributes() in the trunk? It means we have two "high level" methods, but these are worthless if we don't have the other two. To create a DeviceN colorspace, the user would have to pass a fully initialized COSArray to the constructor, instead of constructing an empty object and initialize it later (as is favoured e.g. in the spring framework).

> Can't create PDF with DeviceN colorspace
> ----------------------------------------
>
>                 Key: PDFBOX-2734
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2734
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.8, 1.8.9
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>              Labels: DeviceN
>
> Reported by Floris in the user mailing list. His PDF didn't have the attributes:
> {code}
> 6 0 obj
> <<
> /Cs1 /DeviceGray
> /Cs2 /DeviceN
>  >>
> endobj
> {code}
> Reasons:
> - local array overwrites base array
> - getCOSObject returns name instead of array
> - setAttributes inflates the array too much (likely accidentally introduced in rev 1429524)
> PDF after the fix:
> {code}
> 6 0 obj
> <<
> /Cs1 /DeviceGray
> /Cs2 [/DeviceN [/Cyan /Magenta /Yellow /Black /Orange /Green]
>  /DeviceCMYK 8 0 R 9 0 R]
> >>
> endobj
> {code}
> One of the bugs is also in the trunk, I will test this later.



--
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