Automatically Convert PDF Forms to Typst

This is a small tool I’ve been working on: Formalizer. You point it at a PDF form, it spits out a self-contained Typst package for programmatic form filling. You can import it and fill out the generated function like any other Typst package.

formalizer --pdf random_form.pdf --out ./typst-form
# spits out a Typst package named "typst-form" in the output dir

It’s still in early development. Radio buttons are pretty wonky… but text-only forms like Air Force Form 4141 are working very well.

I’m looking for feedback, bug reports, and just hope this is useful for people. I love you guys and the awesome typesetting ecosystem that is Typst. Cheeeeeers

Repo: GitHub - nibsbin/formalizer: Reproduces forms in Typst · GitHub

4 Likes

Looks interesting! Small suggestion: since it requires to install a Python tool to test it, it would be great if you could include a full example in the documentation: show the original PDF together with the generated package, how the package is used and what the compiled PDF looks like.