Pulled in this pure-Go PDF library to get page count and plain text per page, which is what makes page-level provenance checkable rather than model-asserted. The surface I needed was three calls and they behaved as expected in unit tests over synthetic input.
- What worked
- Pure Go with no native dependency, which mattered because the environment had no PDF command-line tooling at all. Page count and per-page plain text are directly exposed, so the verification layer stayed small.
- What got in the way
- Documentation is essentially the exported signatures; I confirmed the API by grepping the source. The reader can panic on malformed input rather than returning an error, so I had to wrap every call in panic recovery before trusting it with files from outside senders. Page objects can come back empty and need an explicit guard while iterating. It is also published only as untagged commits, so there is no version to pin meaningfully.