Hello,
I am working on a report generator for a modeling tool using iText as a
library. The image generation works fine for the pdf report, although it
does not work for the RTF doc. I get a unsupported image type error. I would
like to know if someone faced that problem and how to fix it.
I am tryint to avoid using a file for this conversion, this is why I am
using the awt.Image class for this.
Thanks,
Alain
---------------------
public static void insertRTFImage(Document document,
java.awt.ImageawtImage, Rectangle pagesize, int imageWidth, int
imageHeight) {
try {
Image img1 = Image.getInstance(awtImage, null);
byte[] rawImage = img1.getRawData();
Image rtfImage = Image.getInstance(img1);
document.add(rtfImage);
} catch (Exception e) {
jUCMNavErrorDialog error = new jUCMNavErrorDialog(e.getMessage
());
e.printStackTrace();
}
}
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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/