Hi,

Thanks for your response, I encode the image (PNG) and add it to my RTF document and in another PDF document to see if there is any difference. Embeding the image seems to work fine but when I resize it (scaleToFit(width0, height0) or scaleAbsolute(width0, height0)), it works in the PDF document but it doesn't work for the RTF document which is the one I have to keep. Does these methods are OK for RTF an if not are there another way to adjust the size of an image to a specific size in RTF document ?

Regards,
Mékafi.

Mark Hall a écrit :
On Monday 19 March 2007 15:23, mékafi wrote:
Making the document works width itext PDF, even though I can't resize the
image (???) and I have to use img.setAbsolutePosition(-100, 0) to see a
little part of the chart. Any idea on what's wrong ?
I can't say why your image is being positioned there. I have no experience with the PDF generation.

The fact that it works with the PDF generation means that the image you are generating is not in any of the formats the RTF output supports. The RTF output only supports JPEG, PNG, WMF (full list in the javadocs). You will have to convert your image to one of these image types first and then add it to the document. You should actually get an exception if you add an image with an unsupported image type. I don't know why you are not seeing that exception.

Greetings,
Mark
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to