Class Splitter.KCloner

java.lang.Object
org.apache.pdfbox.multipdf.Splitter.KCloner
Enclosing class:
Splitter

private class Splitter.KCloner extends Object
Class 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 Details

  • Constructor Details

  • Method Details

    • 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)