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 2018/06/05 17:49:00 UTC

[jira] [Commented] (PDFBOX-4238) How to insert CMYK image without convert to RGB

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

Tilman Hausherr commented on PDFBOX-4238:
-----------------------------------------

how-to questions should be asked on the mailing list. JPEGFactory supports CMYK jpeg files. In theory it should be called by the helper method you used. The current version is 2.0.9 but 2.0.7 should also have it. Please retry with 2.0.9 and attach the code you used and the image and the result PDF. There is no need to set the colorspace yourself.

> How to insert CMYK image without convert to RGB
> -----------------------------------------------
>
>                 Key: PDFBOX-4238
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4238
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.7
>         Environment: Java
>            Reporter: BOOMINATHAN MANIKANDAN
>            Priority: Major
>              Labels: how-to
>
> Hi,
> I am trying to create pdf in java using pdfbox 2.0.7, but problem is I am not able to insert CMYK color space image in pdf. 
> how to do it?
> I am using below code,
> PDImageXObject pdImage = PDImageXObject.createFromFileByContent(imageFile, pDDocument);
>  pdImage.setColorSpace(PDColorSpace.create(COSName.DEVICECMYK));
>  pDPageContentStream.drawImage(pdImage, x, y, width, height);
> Thanks,
> Mani



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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