PyPDFForm · fill a PDF form in Python in a few lines
4 months ago
Filling a PDF form in code usually means fighting the PDF spec. PyPDFForm turns it into ordinary Python. Inspect a form to see its fields, fill it from a dictionary, and save the result, all in a few lines.
Ask about this presentation
Chapters
Show transcriptHide transcript
Filling a PDF form in code usually means fighting the PDF spec. PyPDFForm turns it into ordinary Python. Inspect a form to see its fields, fill it from a dictionary, and save the result, all in a few lines.
It is a Python library and a command line tool for PDF forms. From one object you create forms, inspect them, restyle their fields, and fill them. It also merges PDFs and extracts pages.
Install the library with pip. Want the command line tool too? Install it with pipx and the CLI extra.
You fill fields by name, so first see what the form holds. Wrap your PDF and print its schema. You get a clean JSON schema of every field and its type. Here, three text fields and three checkboxes.
Now fill it. Pass a dictionary of field name to value. Strings go into text fields, and booleans tick the checkboxes. Add flatten equals True, and the filled values are locked, so no one can edit them later.
Write it out, and you have a finished PDF. Here is the blank template, and here it is filled: the text field now shows a value and the checkbox is ticked. Prefer no code? The command line tool runs the same fill from a data file in one line.
That is the first win: inspect, fill, and save. The same object also builds forms from scratch, restyles fields, adds signatures and images, and handles radios, dropdowns, merging, and page extraction. Install it with pip and start from the docs.
Up next
2:03cargo-nextest · a next-generation test runner for Rust
@github
4 months ago
1:35mq · jq, but for Markdown
@github
4 months ago
1:24Mimesis · realistic, locale-aware fake data in one line
@github
4 months ago
1:38pikepdf · open, edit and repair PDFs in Python, losslessly
@github
4 months ago
1:22tfswitch · the right Terraform version, automatically
@github
4 months ago
1:35MCP-UI - interactive apps for MCP tools
@github
4 months ago
1:39workmux - parallel coding agents in isolated worktrees
@github
4 months ago
1:33Pumpkin - start a Rust Minecraft server
@github
4 months ago
1:39Bifrost - your first reliable AI gateway
@github
4 months ago
1:39Honcho - memory that reasons across sessions
@github
4 months ago
1:56agentgateway · one governed proxy for your agent traffic
@github
4 months ago
1:25Compodoc · instant documentation for your Angular app
@github
4 months ago






