org.apache.pdfbox.util
public class PDFCloneUtility extends java.lang.Object
Constructor and Description |
---|
PDFCloneUtility(PDDocument dest)
Creates a new instance for the given target document.
|
Modifier and Type | Method and Description |
---|---|
COSBase |
cloneForNewDocument(java.lang.Object base)
Deep-clones the given object for inclusion into a different PDF document identified by
the destination parameter.
|
void |
cloneMerge(COSObjectable base,
COSObjectable target)
Merges two objects of the same type by deep-cloning its members.
|
PDDocument |
getDestination()
Returns the destination PDF document this cloner instance is set up for.
|
public PDFCloneUtility(PDDocument dest)
dest
- the destination PDF document that will receive the clonespublic PDDocument getDestination()
public COSBase cloneForNewDocument(java.lang.Object base) throws java.io.IOException
base
- the initial object as the root of the deep-clone operationjava.io.IOException
- if an I/O error occurspublic void cloneMerge(COSObjectable base, COSObjectable target) throws java.io.IOException
base
- the base object to be clonedtarget
- the merge targetjava.io.IOException
- if an I/O error occurs