PDF

Flatten PDFs

Bakes form fields, comments, highlights, stamps and other annotations into the page so they can no longer be edited, hidden or removed, writing flattened copies.

Free Command line: flatten-pdfs Version 1.0

Flatten PDFs draws each form field and annotation onto the page exactly as it is shown on screen, then removes the live field or annotation. The result looks the same but can no longer be typed into, moved, hidden or deleted. Flattened copies go to the run's files folder in the same folder structure; the originals are not changed. A PDF with nothing to flatten is copied byte for byte.

Nothing is silently lost. Comment text that is not visible on the page, such as the text of a sticky note, a reply or a highlight's note, is saved to comments.csv before the comment is removed. Annotations that are hidden, on a layer that is switched off, or have no stored appearance are left as they are and counted in the report.

Use it when

How to run it

  1. Choose the folder of PDFs as Input and an Output folder outside it. Only .pdf files are processed.
  2. Leave include-links off unless hyperlinks should also be removed.
  3. Turn on forms-only if comments and markup should stay as they are.
  4. Click Run and read the notes.
  5. Click Open report and check the counts and the Notes column for each file.
  6. If the notes mention comments.csv, open it from the run folder.

Settings

Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help flatten-pdfs lists them.

Settings

SettingWhat it doesType and default
Include links
--include-links
Also flatten hyperlinks. Off (default): links are kept so they still work; they normally have no visible appearance to bake in.
A link that has a stored appearance is drawn onto the page and removed, so it no longer works. Most links have no appearance; those are left in place and counted in AnnotationsLeft.
yes/no
false
Forms only
--forms-only
Only flatten form fields. Comments, highlights, stamps and other annotations are left as they are.
Only form fields are baked in; the interactive form is removed once all its fields are. Comments, highlights, stamps and links are kept as live annotations, and nothing is written to comments.csv.
yes/no
false

Common settings

SettingWhat it doesType and default
Input required
--input
Folder (or single file) to read. It is opened read-only and never modified. folder
empty
Output required
--output
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. folder
empty
Recurse
--recurse
Include sub-folders. yes/no
true
Extensions
--extensions
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. list
empty
Parallelism
--parallelism
Files processed at once. Use 1-2 for spinning disks or network shares. number
4

What you get

Each run creates its own folder inside the output folder, with the report flatten-pdfs.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • Keep comments.csv with the run if the comments themselves might matter, for example reviewer notes on a draft.
  • If some fields could not be flattened, the form is kept with only those fields in it; the Notes column says so.
Watch out for
  • Flattening shows what the PDF has stored for each field. If the notes say the form asked viewers to redraw its fields, open the original and confirm the values shown in the copy are current.
  • Hidden annotations and those on switched-off layers are deliberately left alone. Check them before production, as they remain in the file.

From the command line

The command line is part of LitTechKit Pro. See Command line.

ltk run flatten-pdfs --input "D:\Matter\Production 1\PDF" --output "D:\Matter\Production 1\Flattened"

Related tools