List of usage examples for com.lowagie.text.pdf PdfAcroForm PdfAcroForm
public PdfAcroForm(PdfWriter writer)
From source file:buckley.Pdf.java
License:Apache License
public Pdf(InputStream templateInputStream, OutputStream outputStream) { boolean errorOccured = false; try {/*from w w w . j a va2 s . c om*/ reader = new PdfReader(templateInputStream); document = new Document(reader.getPageSizeWithRotation(1)); writer = PdfWriter.getInstance(document, outputStream); pdfAcroForm = new PdfAcroForm(writer); document.open(); } catch (MalformedURLException e) { throw new RuntimeException(e); } catch (DocumentException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } finally { if (errorOccured) { close(); } } }