Example usage for com.lowagie.text Document addDocListener

List of usage examples for com.lowagie.text Document addDocListener

Introduction

In this page you can find the example usage for com.lowagie.text Document addDocListener.

Prototype


public void addDocListener(DocListener listener) 

Source Link

Document

Adds a DocListener to the Document.

Usage

From source file:fr.opensagres.xdocreport.itext.extension.ExtendedPdfWriter.java

License:Open Source License

public static ExtendedPdfWriter getInstance(Document document, OutputStream os) throws DocumentException {
    PdfDocument pdf = new PdfDocument();
    document.addDocListener(pdf);
    ExtendedPdfWriter writer = new ExtendedPdfWriter(pdf, os);
    pdf.addWriter(writer);/*from  www .  j  a va 2s  .  c o m*/
    return writer;
}

From source file:org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.itext.PatchRtfWriter2.java

License:Open Source License

/**
 * Constructs a new RtfWriter that listens to the specified Document and writes its output to the OutputStream.
 *
 * @param doc//from  w w w  .j a  v  a2 s.c o  m
 *          The Document that this RtfWriter listens to
 * @param os
 *          The OutputStream to write to
 */
protected PatchRtfWriter2(Document doc, OutputStream os) {
    super(doc, os);
    doc.addDocListener(this);
    rtfDoc = new PatchRtfDocument();
}