public class PdfConcatenate extends Object
Modifier and Type | Field and Description |
---|---|
protected PdfCopy |
copy
The actual PdfWriter
|
protected Document |
document
The Document object for PdfCopy.
|
Constructor and Description |
---|
PdfConcatenate(OutputStream os)
Creates an instance of the concatenation class.
|
PdfConcatenate(OutputStream os,
boolean smart)
Creates an instance of the concatenation class.
|
Modifier and Type | Method and Description |
---|---|
int |
addPages(PdfReader reader)
Adds the pages from an existing PDF document.
|
void |
close()
We've finished writing the concatenated document.
|
PdfCopy |
getWriter()
Gets the PdfCopy instance so that you can add bookmarks or change preferences before you close PdfConcatenate.
|
void |
open()
Opens the document (if it isn't open already).
|
public PdfConcatenate(OutputStream os) throws DocumentException
os
- the OutputStream for the PDF documentDocumentException
public PdfConcatenate(OutputStream os, boolean smart) throws DocumentException
os
- the OutputStream for the PDF documentsmart
- do we want PdfCopy to detect redundant content?DocumentException
public int addPages(PdfReader reader) throws DocumentException, IOException
reader
- the reader for the existing PDF documentDocumentException
IOException
public PdfCopy getWriter()
public void open()
public void close()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses