pdf.addWriter(writer);
/** * Constructor * @param document 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<PdfReader, HashMap<RefKey, IndirectReferences>>(); parentObjects = new HashMap<PdfObject, PdfObject>(); disableIndirects = new HashSet<PdfObject>(); indirectObjects = new LinkedHashMap<RefKey, PdfIndirectObject>(); savedObjects = new ArrayList<PdfIndirectObject>(); importedPages = new ArrayList<ImportedPage>(); }
/** * Constructor * @param document 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<PdfReader, HashMap<RefKey, IndirectReferences>>(); parentObjects = new HashMap<PdfObject, PdfObject>(); disableIndirects = new HashSet<PdfObject>(); indirectObjects = new LinkedHashMap<RefKey, PdfIndirectObject>(); savedObjects = new ArrayList<PdfIndirectObject>(); importedPages = new ArrayList<ImportedPage>(); }
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 ); return writer; } }
/** * 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(final Document document, final OutputStream os) throws DocumentException { PdfDocument pdf = new PdfDocument(); document.addDocListener(pdf); PdfWriter writer = new PdfWriter(pdf, os); pdf.addWriter(writer); return writer; }
/** * 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. * @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(final Document document, final OutputStream os, final PdfAConformanceLevel conformanceLevel) throws DocumentException { PdfDocument pdf = new PdfDocument(); document.addDocListener(pdf); PdfAWriter writer = new PdfAWriter(pdf, os, conformanceLevel); pdf.addWriter(writer); return writer; }
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); }
/** * 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(final Document document, final OutputStream os) throws DocumentException { PdfDocument pdf = new PdfDocument(); document.addDocListener(pdf); PdfWriter writer = new PdfWriter(pdf, os); pdf.addWriter(writer); return writer; }
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); }
public static ExtendedPdfAWriter getInstance( Document document, OutputStream os, IPdfAWriterConfiguration configuration ) throws DocumentException { PdfDocument pdf = new PdfDocument(); document.addDocListener( pdf ); PdfAConformanceLevel conformanceLevel = null; if ( configuration != null ) { conformanceLevel = configuration.getConformanceLevel(); } ExtendedPdfAWriter writer = new ExtendedPdfAWriter( pdf, os, conformanceLevel, configuration ); pdf.addWriter( writer ); return writer; }
/** * 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>OutputStream</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(final Document document, final OutputStream os, final DocListener listener) throws DocumentException { PdfDocument pdf = new PdfDocument(); pdf.addDocListener(listener); document.addDocListener(pdf); PdfWriter writer = new PdfWriter(pdf, os); pdf.addWriter(writer); return writer; }
/** * 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. * @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(final Document document, final OutputStream os, final DocListener listener, final PdfAConformanceLevel conformanceLevel) throws DocumentException { PdfDocument pdf = new PdfDocument(); pdf.addDocListener(listener); document.addDocListener(pdf); PdfAWriter writer = new PdfAWriter(pdf, os, conformanceLevel); pdf.addWriter(writer); return writer; }
/** * 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>OutputStream</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(final Document document, final OutputStream os, final DocListener listener) throws DocumentException { PdfDocument pdf = new PdfDocument(); pdf.addDocListener(listener); document.addDocListener(pdf); PdfWriter writer = new PdfWriter(pdf, os); pdf.addWriter(writer); return writer; }
pdf.addWriter(this); if (append) { body.setRefnum(reader.getXrefSize());
pdf.addWriter(this); if (append) { body.setRefnum(reader.getXrefSize());