Pagetree ISO 14289
Reference Manual

Command-line, GitHub Actions, and HTTP batch reference.

Pagetree ships as a single native binary for Linux, macOS, and Windows with no external runtime dependencies. Every command accepts PDF/UA-1 by default and PDF/UA-2 via --ua2 or --profile ua2.

Command-line subcommands

Command Purpose Exit codes
pagetree check <in.pdf> Validate a single PDF against PDF/UA-1 or PDF/UA-2 and print rule findings. 0 pass · 1 fail · 2 error
pagetree fix <in.pdf> -o <out.pdf> Run assisted remediation and write a structurally conformant output PDF. 0 ok · 2 error
pagetree batch <in_dir> -o <out_dir> Remediate all PDFs recursively across multiple CPU cores while preserving relative paths. 0 ok · 1 partial error · 2 error
pagetree batch-check <in_dir> Validate every PDF under a directory tree and emit summary, JSON, or SARIF 2.1.0 output. 0 all pass · 1 any fail · 2 error
pagetree licence <key> Verify and store an offline Ed25519 PGT1 commercial licence key locally. 0 valid · 1 invalid
Flag Applies to Behaviour
--ua2check, fix, batch, batch-checkValidate or author against PDF/UA-2 (ISO 14289-2:2024, PDF 2.0).
--profile ua1|ua2check, fix, batch, batch-checkSelect explicit target profile (ua1 default, or ua2).
--rebuildfix, batchStrip an existing broken structure tree and infer a fresh tag tree from page geometry.
--jobs N / -j Nbatch, batch-checkSet worker thread count (defaults to available hardware concurrency).
--jsoncheck, fix, batch, batch-checkEmit machine-readable JSON reports on standard output.
--sarifcheck, batch-checkEmit SARIF 2.1.0 JSON for GitHub Code Scanning and audit archives.

GitHub Actions integration

Gate published PDFs on every branch change and upload SARIF 2.1.0 findings directly to GitHub Code Scanning.

name: PDF/UA Conformance Check
on: [push]

jobs:
  pdfua:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run Pagetree PDF/UA-1 check
        run: |
          pagetree batch-check ./docs/pdfs --sarif > pagetree.sarif
      - name: Upload SARIF report
        if: always()
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: pagetree.sarif

Hosted HTTP batch service

The Hosted Batch tier (£99/month including 10,000 pages, plus £0.01 per additional page) processes uploaded PDFs in memory and discards both input and output bytes immediately after returning the response.

# Validate a PDF over HTTPS (returns JSON report)
curl -sS -X POST "https://pagetree.dev/batch/check?profile=ua1" \
  -H "Authorization: Bearer $PAGETREE_TOKEN" \
  -H "Content-Type: application/pdf" \
  --data-binary @document.pdf

# Assisted remediation over HTTPS (returns PDF bytes)
curl -sS -X POST "https://pagetree.dev/batch/fix?profile=ua1&rebuild=1" \
  -H "Authorization: Bearer $PAGETREE_TOKEN" \
  -H "Content-Type: application/pdf" \
  --data-binary @document.pdf \
  -o document-ua1.pdf
Retention and security

Zero document retention

Documents submitted to the hosted HTTP batch service are processed in memory and deleted immediately when the HTTP response finishes. Pagetree logs only request counts, page counts, HTTP status codes, and billing identifiers needed for Stripe metered accounting.

Organisations requiring strictly air-gapped processing can run the identical binary locally under a Pro, Team, or Site licence.