* @param parentTreeEntry
* @param objMapping mapping between old and new references
*/
private void updatePageReferences(COSDictionary parentTreeEntry, HashMap<COSDictionary, COSDictionary> objMapping)
{
COSBase page = parentTreeEntry.getDictionaryObject(COSName.PG);
if (page instanceof COSDictionary)
{
if (objMapping.containsKey(page))
{
parentTreeEntry.setItem(COSName.PG, objMapping.get(page));
}
}
COSBase obj = parentTreeEntry.getDictionaryObject(COSName.OBJ);
if (obj instanceof COSDictionary)
{
if (objMapping.containsKey(obj))
{
parentTreeEntry.setItem(COSName.OBJ, objMapping.get(obj));
}
}
COSBase kSubEntry = parentTreeEntry.getDictionaryObject(COSName.K);
if (kSubEntry instanceof COSArray)
{
updatePageReferences((COSArray) kSubEntry, objMapping);
}
else if (kSubEntry instanceof COSDictionary)