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).
|
protected Document document
protected PdfCopy copy
public PdfConcatenate(OutputStream os) throws DocumentException
os
- the OutputStream for the PDF document
DocumentException
public PdfConcatenate(OutputStream os, boolean smart) throws DocumentException
os
- the OutputStream for the PDF document
smart
- do we want PdfCopy to detect redundant content?
DocumentException
public int addPages(PdfReader reader) throws DocumentException, IOException
reader
- the reader for the existing PDF document
DocumentException
IOException
public PdfCopy getWriter()
public void open()
public void close()
Copyright © 1998–2022. All rights reserved.