Package com.pd4ml.pdf.merge.internal
Class OutlineMerger
- java.lang.Object
-
- com.pd4ml.pdf.merge.internal.OutlineMerger
-
public final class OutlineMerger extends java.lang.ObjectSplices each merge source's own outline (bookmark) tree (/Root/Outlines, ISO 32000-1 12.3.3) onto the end of the merged target's, in the same orderPdfMergerprocesses sources -- mirroring legacycom.pd4ml.pdf.parser.PdfDoc#mergeOutlines's own append-order splice (link the accumulated tree's last top-level node's/Nextto the new source's first, re-parent the new source's top-level siblings, sum/Count).Scope note, mirroring
PdfMerger.mergeOutlines(boolean)'s own javadoc: this assumes every page of a source that contributes an outline is included in the merge (true for both current callers --PdfDocumentBase#appendandPD4ML's own render-time merge seam always select an entire source). An outline node's own/Dest//Adestination pointing at a page that was not selected is not pruned the wayStructureTreeMerger/UnreachableObjectSweepertogether handle for the structure tree -- not needed by either current caller, and left as a documented limitation rather than replicated speculatively.
-
-
Constructor Summary
Constructors Constructor Description OutlineMerger(COSObjectImporter importer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSObjectfinish()voidmergeSource(COSDocument sourceDoc, COSDictionary sourceCatalog)Call once per source, in the same orderPdfMergeritself processes sources.
-
-
-
Constructor Detail
-
OutlineMerger
public OutlineMerger(COSObjectImporter importer)
-
-
Method Detail
-
mergeSource
public void mergeSource(COSDocument sourceDoc, COSDictionary sourceCatalog)
Call once per source, in the same orderPdfMergeritself processes sources.
-
finish
public COSObject finish()
- Returns:
- the merged
/Outlinesreference to install on the merged catalog, ornullif no source contributed one.
-
-