Hi,

I want to scale down an image for it to fit into the header of the page.
It works fine with RtfWriter using image.scalePercent(...) or
scaleAbsolute(...), but the same technique doesn't work when I use RtfWriter2
instead.

Here is a sample code for a 50% reduction of the image :

Image img = Image.getInstance(...);
img.scalePercent(50);
Phrase headerPhrase = new Phrase(new Chunk(img, 0, 0));
HeaderFooter header = new HeaderFooter(headerPhrase, false);
document.setHeader(header);

Using RtfHeaderFooter (from package com.lowagie.text.rtf.headerfooter) 
doesn't help.

Any suggestion ?

Thanks in advance,
Best regards,

Antoine.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to