v0.6.0 · .pdfl language + pdfl CLI

Your PDF checklist, as code that runs.

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.

profiles/offset.pdfl — an offset preflight profile
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(", ")}"
  }
}
134
documented functions
7
namespaces
12
CLI commands
8
documentation languages

Seven namespaces, one language

Each namespace covers one class of problem. Import what you use; a script that never touches codes:: never pays for the page scan.

prepress:: 30 functions

Prepress

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.

text:: 25 functions

Text

Extraction, normalization, regex search and validation of the content that is actually in the file — including Brazilian document formats and personal data detection.

struct:: 23 functions

Structure

The file itself: metadata, XMP, internal objects, encryption and permissions, hashing. Answers whether the PDF is what it claims to be.

fix:: 19 operations

Normalization

Boxes, page rotation and order, watermarks, merge and split, optimization. Writes a new PDF; the original is never touched.

visual:: 16 functions

Images

Effective resolution, quality, perceptual hash and SSIM comparison between two versions. Catches the low-resolution logo the eye approves at 100%.

codes:: 13 functions

Barcodes

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.

data:: 8 functions

External data

Cross-checks document content against your own glossaries, datasets and lookup tables. Batch numbers, SKUs, approved terminology.

Exit codes, not screenshots

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.

the same profile, now blocking a merge
# .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

Written for production

Print shop

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.

Legal publisher

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.

Regulated manufacturing

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.

Subscribe to PDFLang

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.

See the plans