/** * The initial parse will first parse only the trailer, the xrefstart and all xref tables to have a pointer (offset) * to all the pdf's objects. It can handle linearized pdfs, which will have an xref at the end pointing to an xref * at the beginning of the file. Last the root object is parsed. * * @throws IOException If something went wrong. */ private void initialParse() throws IOException { COSDictionary trailer = retrieveTrailer(); COSBase rootObject = parseTrailerValuesDynamically(trailer); // resolve all objects // A FDF doesn't have a catalog, all FDF fields are within the root object if (rootObject instanceof COSDictionary) { parseDictObjects((COSDictionary) rootObject, (COSName[]) null); } initialParseDone = true; }
/** * The initial parse will first parse only the trailer, the xrefstart and all xref tables to have a pointer (offset) * to all the pdf's objects. It can handle linearized pdfs, which will have an xref at the end pointing to an xref * at the beginning of the file. Last the root object is parsed. * * @throws IOException If something went wrong. */ private void initialParse() throws IOException { COSDictionary trailer = retrieveTrailer(); COSBase rootObject = parseTrailerValuesDynamically(trailer); // resolve all objects // A FDF doesn't have a catalog, all FDF fields are within the root object if (rootObject instanceof COSDictionary) { parseDictObjects((COSDictionary) rootObject, (COSName[]) null); } initialParseDone = true; }
COSBase rootObject = parseTrailerValuesDynamically(trailer);