PDFLang
A scripting language for validating PDFs
Readable by people who do not program. No classes, no inheritance, no semicolons — just checks and assertions, run by the pdfl CLI.
Get started in 30 seconds
Save it as profile.pdfl and run it against any document:
// Each check becomes a section of the report.
check "Basic structure" {
require doc.page_count > 0
assert doc.title != "", "PDF has no title in its metadata"
}
check "Ink within limit" tags: ["prepress"] {
require prepress::validate_tac_limits(300)
}pdfl run profile.pdfl document.pdfWhy PDFLang
Written for people, not programmers
Pages count from 1. Measurements accept 3mm and 1in. Every failure message is one you can hand to a client as it is.
Batteries included
Text, structure, images, prepress, barcodes, external data and automatic fixes — nine built-in modules, nothing to wire up.
Built for pipelines
JSON reports on stdout and exit codes that mean something: 0 passed, 1 warnings, 2 validation errors, 3 syntax error.
Install
Installers for Linux, macOS and Windows, with pdfium bundled.
Linux
sudo dpkg -i pdfl_0.10.1_amd64.debmacOS
open pdfl-0.10.1-macos-arm64.dmgWindows
msiexec /i pdfl-0.10.1-windows-amd64.msi /qn
Documentation
The full language manual, a reference for every function, and ready-made recipes.
Read the documentation