本文整理匯總了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();
}