v0.6.0 · .pdfl language + pdfl CLI
PDFLang replaces the checklist someone reads off a screen with a script you keep in version control. Ink coverage, embedded fonts, mandatory clauses, barcodes, personal data — declared once, verified on every file, in the terminal or in CI.
profile "offset-magazine" { const TAC_LIMIT = 300% const MIN_DPI = 300 check "Ink coverage" tags: ["prepress"] { doc.pages.each { |page| tac = prepress::calculate_exact_tac(page.number) assert tac <= TAC_LIMIT, "page #{page.number}: #{tac}% ink" } } check "Fonts" tags: ["fonts"] { loose = prepress::detect_text_substitution() assert loose.length == 0, "fonts not embedded: #{loose.join(", ")}" } }
Each namespace covers one class of problem. Import what you use; a script that never touches codes:: never pays for the page scan.
Exact TAC ink coverage, separations, spot colors, rich black, hairlines, font substitution, minimum body size, boxes and bleed. What the plate would have shown you, before the plate.
Extraction, normalization, regex search and validation of the content that is actually in the file — including Brazilian document formats and personal data detection.
The file itself: metadata, XMP, internal objects, encryption and permissions, hashing. Answers whether the PDF is what it claims to be.
Boxes, page rotation and order, watermarks, merge and split, optimization. Writes a new PDF; the original is never touched.
Effective resolution, quality, perceptual hash and SSIM comparison between two versions. Catches the low-resolution logo the eye approves at 100%.
Detects and decodes EAN, UPC, Code 128/39, ITF, QR Code, Data Matrix, Aztec and PDF417 — and checks the payload against what should be there.
Cross-checks document content against your own glossaries, datasets and lookup tables. Batch numbers, SKUs, approved terminology.
Every validating command follows the same convention: 0 passed, 1 warnings only, 2 validation errors, 3 syntax error in the script. The report comes out as JSON, CSV, HTML or an audit PDF — one for the pipeline, one for the client.
# .github/workflows/preflight.yml - run: pdfl run profiles/offset.pdfl artwork.pdf \ --output html --output-file report.html \ --fail-on warning # 0 ok · 1 warnings · 2 validation errors · 3 syntax error $ pdfl run profiles/offset.pdfl artwork.pdf $ echo $? 2
The file arrives from the client and someone has to check ink, fonts, images and bleed before it goes to plate. A mistake found afterwards costs the whole run.
One profile per stock. pdfl watch validates whatever lands in the hot folder and returns an HTML report you can forward as-is.
Contracts and policies must carry mandatory clauses, must not leak personal data, and must keep metadata consistent across every revision.
Clauses become assertions with your own failure messages. pdfl compare shows what changed between two revisions of the same document.
The package insert has to carry the texts the regulator requires and a batch code that matches the batch actually being produced.
text:: checks the mandatory wording, codes:: decodes the printed Data Matrix and compares it against the production dataset.
Licensing is per device: pdfl fingerprint identifies the machine, pdfl license activates it. Same binary on the operator's desktop and on the build agent.