Example usage for com.lowagie.text.pdf PdfAcroForm PdfAcroForm

List of usage examples for com.lowagie.text.pdf PdfAcroForm PdfAcroForm

Introduction

In this page you can find the example usage for com.lowagie.text.pdf PdfAcroForm PdfAcroForm.

Prototype

public PdfAcroForm(PdfWriter writer) 

Source Link

Document

Creates new PdfAcroForm

Usage

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();
        }
    }
}