Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.7.0
    • Component/s: Parsing
    • Labels:
      None

      Description

      A conforming parser will start at the end of the file and read backward until it has read the EOF marker, the xref location, and trailer[1]. Once this is read, it will read in the xref table so it can locate other objects and revisions. This also allows skipping objects which have been rendered obsolete (per the xref table)[2]. It also allows the minimum amount of information to be read when the file is loaded, and then subsequent information will be loaded if and when it is requested. This is all laid out in the official PDF specification, ISO 32000-1:2008.

      Existing code will be re-used where possible, but this will require new classes in order to accommodate the lazy reading which is a very different paradigm from the existing parser. Using separate classes will also eliminate the possibility of regression bugs from making their way into the PDDocument or BaseParser classes. Changes to existing classes will be kept to a minimum in order to prevent regression bugs.

      [1] Section 7.5.5 "Conforming readers should read a PDF file from its end"
      [2] Section 7.5.4 "the entire file need not be read to locate any particular object"

        Attachments

        1. ConformingPDDocument.java
          3 kB
          Adam Nichols
        2. ConformingPDFParserTest.java
          2 kB
          Adam Nichols
        3. gdb-refcard.pdf
          75 kB
          Adam Nichols
        4. XrefEntry.java
          1 kB
          Adam Nichols
        5. conforming-parser.patch
          6 kB
          Adam Nichols
        6. ConformingPDFParser.java
          27 kB
          Adam Nichols
        7. COSUnread.java
          2 kB
          Adam Nichols
        8. PDFLexer.java
          45 kB
          Maruan Sahyoun
        9. PDFStreamConstants.java
          5 kB
          Maruan Sahyoun
        10. PDFLexer.java
          46 kB
          Maruan Sahyoun
        11. PDFStreamConstants.java
          4 kB
          Maruan Sahyoun

          Issue Links

            Activity

              People

              • Assignee:
                adamnichols Adam Nichols
                Reporter:
                adamnichols Adam Nichols
              • Votes:
                4 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: