Class FDFParser

    • Constructor Detail

      • FDFParser

        public FDFParser​(RandomAccessRead source)
                  throws java.io.IOException
        Constructs parser for given file using memory buffer.
        Parameters:
        source - the source of the pdf to be parsed
        Throws:
        java.io.IOException - If something went wrong.
    • Method Detail

      • initialParse

        private void initialParse()
                           throws java.io.IOException
        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:
        java.io.IOException - If something went wrong.
      • parse

        public FDFDocument parse()
                          throws java.io.IOException
        This will parse the stream and populate the FDFDocument object.
        Returns:
        the parsed FDFDocument
        Throws:
        java.io.IOException - If there is an error reading from the stream or corrupt data is found.