Beispiel #1
0
 /**
  * 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>Stream</CODE> the writer has to write to.
  * @param listener A <CODE>DocListener</CODE> to pass to the PdfDocument.
  * @param conformanceLevel PDF/A conformance level of a new PDF document
  * @return	a new <CODE>PdfWriter</CODE>
  * @throws	DocumentException on error
  */
 public static PdfAWriter GetInstance(Document document, Stream os, IDocListener listener, PdfAConformanceLevel conformanceLevel){
     PdfDocument pdf = new PdfDocument();
     pdf.AddDocListener(listener);
     document.AddDocListener(pdf);
     PdfAWriter writer = new PdfAWriter(pdf, os, conformanceLevel);
     pdf.AddWriter(writer);
     return writer;
 }
Beispiel #2
0
 /**
 * Use this method to get an instance of the <CODE>PdfWriter</CODE>.
 *
 * @return a new <CODE>PdfWriter</CODE>
 * @param document The <CODE>Document</CODE> that has to be written
 * @param os The <CODE>Stream</CODE> the writer has to write to.
 * @param listener A <CODE>DocListener</CODE> to pass to the PdfDocument.
 * @throws DocumentException on error
 */
 
 public static PdfWriter GetInstance(Document document, Stream os, IDocListener listener)
 {
     PdfDocument pdf = new PdfDocument();
     pdf.AddDocListener(listener);
     document.AddDocListener(pdf);
     PdfWriter writer = new PdfWriter(pdf, os);
     pdf.AddWriter(writer);
     return writer;
 }