Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4238

How to insert CMYK image without convert to RGB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.0.7
    • None
    • PDModel
    • Java

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            bmani_tn BOOMINATHAN MANIKANDAN
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: