use of com.tom_roush.pdfbox.pdmodel.documentinterchange.logicalstructure.PDParentTreeValue in project PdfBox-Android by TomRoush.
the class PDFMergerUtility method updatePageReferences.
/**
* Update the Pg and Obj references to the new (merged) page.
*/
private void updatePageReferences(PDFCloneUtility cloner, Map<Integer, COSObjectable> numberTreeAsMap, Map<COSDictionary, COSDictionary> objMapping) throws IOException {
for (COSObjectable obj : numberTreeAsMap.values()) {
if (obj == null) {
continue;
}
PDParentTreeValue val = (PDParentTreeValue) obj;
COSBase base = val.getCOSObject();
if (base instanceof COSArray) {
updatePageReferences(cloner, (COSArray) base, objMapping);
} else {
updatePageReferences(cloner, (COSDictionary) base, objMapping);
}
}
}
Aggregations