本文整理汇总了Java中com.lowagie.text.Document.addDocListener方法的典型用法代码示例。如果您正苦于以下问题:Java Document.addDocListener方法的具体用法?Java Document.addDocListener怎么用?Java Document.addDocListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.lowagie.text.Document
的用法示例。
在下文中一共展示了Document.addDocListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PdfCopyFieldsImp
import com.lowagie.text.Document; //导入方法依赖的package包/类
PdfCopyFieldsImp(OutputStream os, char pdfVersion) throws DocumentException {
super(new PdfDocument(), os);
pdf.addWriter(this);
if (pdfVersion != 0)
super.setPdfVersion(pdfVersion);
nd = new Document();
nd.addDocListener(pdf);
}
示例2: PdfCopy
import com.lowagie.text.Document; //导入方法依赖的package包/类
/**
* Constructor
* @param document
* @param os outputstream
*/
public PdfCopy(Document document, OutputStream os) throws DocumentException {
super(new PdfDocument(), os);
document.addDocListener(pdf);
pdf.addWriter(this);
indirectMap = new HashMap();
}
示例3: getInstance
import com.lowagie.text.Document; //导入方法依赖的package包/类
/**
* Use this method to get an instance of the <CODE>PdfWriter</CODE>.
*
* @param document The <CODE>Document</CODE> that has to be written
* @param os The <CODE>OutputStream</CODE> the writer has to write to.
* @return a new <CODE>PdfWriter</CODE>
*
* @throws DocumentException on error
*/
public static PdfWriter getInstance(Document document, OutputStream os)
throws DocumentException {
PdfDocument pdf = new PdfDocument();
document.addDocListener(pdf);
PdfWriter writer = new PdfWriter(pdf, os);
pdf.addWriter(writer);
return writer;
}
示例4: RtfWriter2
import com.lowagie.text.Document; //导入方法依赖的package包/类
/**
* Constructs a new RtfWriter that listens to the specified Document and
* writes its output to the OutputStream.
*
* @param doc The Document that this RtfWriter listens to
* @param os The OutputStream to write to
*/
protected RtfWriter2(Document doc, OutputStream os) {
super(doc, os);
doc.addDocListener(this);
rtfDoc = new RtfDocument();
}