Skip to content

XrefRevision.StartXrefOffset is written and never read #210

Closed

Description

@Tim81

Found during the #97 review; out of scope there.

XrefRevision (src/VellumPdf.Reader/XrefParser.cs:14) carries two fields. XrefOffset is used;
StartXrefOffset (:20) is assigned in the constructor at :25 and read by nothing, in src/ or in
tests/.

Easy to mistake for covered: PdfDocumentReader.StartXrefOffset is a different property with the
same name, and it is well exercised (IncrementalAppendTests, PdfReaderTests,
RevisionAndEndOffsetTests). Grepping the bare name finds those and looks like coverage. Only
XrefRevision's copy is dead.

Either delete the field, or give it the reader it was added for — the two values genuinely differ on a
file whose startxref does not point exactly at its own xref (an off-by-a-few offset the parser
tolerates), and something in the recovery path may well want both. It is a struct field either way, so
this is a one-line change plus whatever justifies it.

Activity

  1. added
    type/chore
    area/reader
    on Aug 27, 2026
  2. added 4 commits that reference this issue on Sep 6, 2026
    8ea1742
    59b61c4
    0fc0c12
    fb075b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/readertype/chore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions