shared items

Friday, September 5, 2008

Create PDF with IText

com.lowagie.text.Document pdoc = null;
PdfWriter pw = null;
FileOutputStream fosPdf = null;
File ftemp = createTemp();
try
{
fosPdf = new FileOutputStream(ftemp); // File to be determined by properties
pdoc = new com.lowagie.text.Document(PageSize.A4.rotate());
pw = PdfWriter.getInstance(pdoc, fosPdf);
pdoc.open();
flushRoot(companyElement, rootElement, pw, pdoc);
pdoc.close();

No comments: