I want an image located on my local disk to the pdf. I've tried DrawInlineImageCCITT and DrawInlineImagePlain examples where I noticed that it draws a byte array, so I managed to convert the image to a byte array and draw it but the resulting pdf is corrupted.
I also tried:
PDImage pdImage = (PDImage) PDImage.META.createNew();
but I got the same results. Is there a way to add an image to the pdf?
sorry for such a delay.
you will find more support for platform images in the jPodRenderer part of the project, hosted here on sourceforge,too. jPodRenderer support "conversion" to platform graphics (rendering) and (for what reason ever) also the other way round is implemented there.
drawback may be that jPodRenderer is GPL licensed.
Anyway, in "DrawImage" there's a complete example for embedding an image, in "ImageConverterAwt2Pdf" you will find the conversion mechanics.