By Date: <-- -->
By Thread: <-- -->

GIF to PDF, no files



Raphael Watier wrote:

> I need to convert a GIF image (not in a file but in a byte[])

com.lowagie.text.Image.getInstance
will give you an object that can be added to a PDF document with iText.

> and I need to obtain a PDF in a byte[]. I can't create a file with a 
> path, name, etc.

Document document = new Document();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfWriter.getInstance(document, baos);
document.open();
// do stuff with document
document.close();
byte[] pdf = baos.toByteArray();

For more info on // do stuff with document
please read the tutorial.
br,
Bruno

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions