Hi,

I want to insert a cmyk image in a pdf document.
Here is what I've tried :

- Create a BufferedImage with a CMYK type ColorSpace
- Set some pixels programatically
- Insert the BufferedImage in the document with PDPixelMap
==> Throws a IllegalStateException (which is consistent with the code
which checks that ColorSpace has 1 or 3 components) :-(

I've also tried to save my BufferedImage as a Tiff with Commons Imaging,
which works fine, but If I try to include it as a PDPixelMap, I have the
same error as above, and if I compress it as a CCITT image, It converts it
to black/white. Which kind of tiff can I include in a pdf exactly ?

Finally, I had a try with PdfBox 1.8.5 (previous tests were with 1.8.4), but
with 1.8.5, inserting a RGB BufferedImage, which works fine with 1.8.4,
creates a PDF I can't open with acrobat reader :-(

Any hint about one of these problem is welcome,

Michaƫl



Reply via email to