Example usage for com.lowagie.text.xml SAXiTextHandler SAXiTextHandler

List of usage examples for com.lowagie.text.xml SAXiTextHandler SAXiTextHandler

Introduction

In this page you can find the example usage for com.lowagie.text.xml SAXiTextHandler SAXiTextHandler.

Prototype

public SAXiTextHandler(DocListener document) 

Source Link

Usage

From source file:org.apache.cocoon.serialization.iTextSerializer.java

License:Apache License

public void setOutputStream(OutputStream out) {
    this.document = new Document(this.pageSize);

    try {// ww w.  ja  v  a  2 s  .  c  om
        PdfWriter.getInstance(document, out);
    } catch (Exception e) {
        getLogger().error("cannot create pdf writer instance", e);
        //TC: FIXME! shouldn't we throw an exception here? what kind?
    }

    SAXiTextHandler handler = new SAXiTextHandler(document);
    handler.setControlOpenClose(true);
    this.contentHandler = handler;
}