// PDFBOX-1606 - after securityHandler has been instantiated
for (COSBase trailerEntry : trailer.getValues())
{
if (trailerEntry instanceof COSObject)
{
COSObject tmpObj = (COSObject) trailerEntry;
parseObjectDynamically(tmpObj, false);
}
}
// ---- parse catalog or root object
COSObject root = (COSObject) xrefTrailerResolver.getTrailer().getItem(COSName.ROOT);
if (root == null)
{
throw new IOException("Missing root object specification in trailer.");
}
COSBase rootObject = parseObjectDynamically(root, false);
// ---- resolve all objects
if (isFDFDocment)
{
// A FDF doesn't have a catalog, all FDF fields are within the root object
if (rootObject instanceof COSDictionary)
{
parseDictObjects((COSDictionary) rootObject, (COSName[]) null);
allPagesParsed = true;
document.setDecrypted();
}
}
else if(!parseMinimalCatalog)
{
COSObject catalogObj = document.getCatalog();
if (catalogObj != null)
{
if (catalogObj.getObject() instanceof COSDictionary)
{
parseDictObjects((COSDictionary) catalogObj.getObject(), (COSName[]) null);
allPagesParsed = true;
document.setDecrypted();
}
}
}