Package org.apache.pdfbox.multipdf
Class Splitter.KCloner
- java.lang.Object
-
- org.apache.pdfbox.multipdf.Splitter.KCloner
-
- Enclosing class:
- Splitter
private class Splitter.KCloner extends java.lang.ObjectClass to help clone the /K tree. It clones structure elements and fills the structure elements map. Pages are replaced with the help of the page map. Elements with pages that don't belong to the destination are removed from the clone.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) PDPageTreedstPageTree
-
Constructor Summary
Constructors Constructor Description KCloner(PDPageTree dstPageTree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private COSBasecreateArrayClone(COSBase src, COSBase dstParent, COSDictionary currentPageDict)(package private) COSBasecreateClone(COSBase src, COSBase dstParent, COSDictionary currentPageDict)Creates a clone of the source.private COSBasecreateDictionaryClone(COSBase src, COSBase dstParent, COSDictionary currentPageDict)private booleanhasMCIDs(COSBase kid)private voidremovePossibleOrphanAnnotation(COSDictionary srcObj, COSDictionary srcDict, COSDictionary currentPageDict, COSDictionary dstDict)
-
-
-
Field Detail
-
dstPageTree
PDPageTree dstPageTree
-
-
Constructor Detail
-
KCloner
KCloner(PDPageTree dstPageTree)
-
-
Method Detail
-
createClone
COSBase createClone(COSBase src, COSBase dstParent, COSDictionary currentPageDict)
Creates a clone of the source.- Parameters:
src- source dictionary or array.dstParent- for the /P entry; parameter needed because arrays don't keep a parent.currentPageDict- used to remember whether we have a page parent somewhere or not. Starts with null.- Returns:
- a clone, or null if source is null or if there is no clone because it belongs to a different page or to no page.
-
createArrayClone
private COSBase createArrayClone(COSBase src, COSBase dstParent, COSDictionary currentPageDict)
-
createDictionaryClone
private COSBase createDictionaryClone(COSBase src, COSBase dstParent, COSDictionary currentPageDict)
-
hasMCIDs
private boolean hasMCIDs(COSBase kid)
-
removePossibleOrphanAnnotation
private void removePossibleOrphanAnnotation(COSDictionary srcObj, COSDictionary srcDict, COSDictionary currentPageDict, COSDictionary dstDict)
-
-