Skip to content

Releases: go-pdfkit/forms

v0.6.0

Choose a tag to compare

@tannevaled tannevaled released this 26 Oct 12:45
1397913

Release backfilled on 2026-10-26; tag created 2026-10-22.

Commits since v0.5.0:

  • 6d60268 fix(deps): update dependencies (#14)
  • 3573734 chore(deps): update dependency go to v1.27.2 (#15)
  • 391acd4 fix(deps): update module github.com/go-pdfkit/reader to v0.9.0 (#16)
  • c67eb85 fix(deps): update dependencies (#17)
  • 1397913 A form can be written, not only read (#19)

v0.3.0 — when the XML is the whole form

Choose a tag to compare

@tannevaled tannevaled released this 30 Aug 14:24
39dae2a

XFA came in two kinds and this package treated them as one.

Measured over 2 240 real government forms: 1 499 carry a form, 560 carry an XFA package, and 546 of those are static — a second, proprietary description of a form that is already there, on which everything here already works.

The other fourteen are dynamic: their pages hold a panel reading "Please wait… your PDF viewer may not be able to display this type of document", and the form is laid out from the XML by Adobe's reader and nothing else, the format having been removed from PDF 2.0. A caller meeting one has a document that looks blank and is not.

Form.Dynamic says which kind. Form.Packets hands back the parts of the package, so the values a form was filled with can be read — they live in the datasets part, as ordinary XML.

What measuring found. The library first answered "none dynamic" where the corpus said fourteen: Read refuses a form with no fields, and a dynamic XFA form usually has no AcroForm fields. The documents most needing to be reported were exactly the ones being refused. An empty field list with no XFA is still no form — 561 of 118 833 figure-corpus files carry one a producer left behind — but an empty one with a package is a form whose fields live elsewhere.

The library's count now matches the corpus exactly: 560 packages, 14 dynamic.

100% statement coverage, go vet and -race clean, nine cross-compile targets, CGO-free.

v0.2.2 — the reader that salvages, decrypts /Crypt and answers the same twice

Choose a tag to compare

@tannevaled tannevaled released this 27 Aug 18:41
f6a1a64

A dependency release, taken because a module lagging its own dependency is how pdffont shipped a 21-second reader.Open to its callers for a whole release.

reader v0.6.0 brings three things this module was doing without:

  • /Crypt — 209 files, 12.8% of the 1 633 real forms, carry the filter, and every one of them used to decode to nothing readable.
  • Determinism — a second map-order non-determinism, in indexObjectStreams, distinct from the inline-image one v0.4.2 settled: five different answers in five runs of the same binary on the same file.
  • Salvage — a damaged stream's decoded prefix is kept and labelled as salvage, instead of being returned with a nil error as though it were the whole of it.

Nothing in this module's own output changes, and that was measured rather than assumed: over all 2 268 forms, the whole field tree, every widget's stored appearance and 88 159 freshly drawn appearances come back byte-identical.