pdf-tools

Unified alolipdf CLI front-end for the ALOLI PDF tool suite (combine, validate, sign, verify, watermark).

= aloli-crystal/pdf-tools — alolipdf :toc: left :toc-title: Contents

Unified alolipdf command-line front-end for the ALOLI PDF tool suite. One discoverable entry point — alolipdf <tool> … — over the whole suite, with consistent UX and a doctor that tells you what's installed.

== How it works

alolipdf is a single compiled megabinary. The ALOLI Crystal tools are linked in and invoked in-process via each tool's Cli.run(argv) : Int32 — no child process, no separate binaries to install. poppler's info / fonts are not ours to compile, so they stay shell-outs (hence hybrid).

[cols="1,2,3,1",options="header"] |=== | Subcommand | Backed by | What it does | How

| combine | CombinePDF::Cli | merge / number / compress / encrypt PDFs | in-process | validate | PDF::Validate::CLI | PDF/A-1b·2b·3b and PDF/UA conformance | in-process | sign | PDF::Signature::Cli | sign a PDF (PAdES B-B → B-LTA, TSA, LTV, PKCS#11) | in-process | verify | PDF::Signature::Cli | verify a PDF's signatures | in-process | watermark | Watermark::Cli | stamp a watermark | in-process | info | poppler pdfinfo | document metadata | shell-out | fonts | poppler pdffonts | font listing | shell-out |===

Plus the built-ins help [<tool>], version, and doctor.

This became possible once the whole suite was levelled onto pdf 1.x and each tool exposed a callable Cli.run. A single pdf version across the graph is what lets them be compiled together.

== Install

Build once — everything ALOLI is baked in:

[source,shell]

shards build --release ln -s "$PWD/bin/alolipdf" ~/bin/alolipdf

Only the external info / fonts need poppler (brew install poppler, apt install poppler-utils…), resolved from $ALOLIPDF_INFO / $ALOLIPDF_FONTS or PATH. Run alolipdf doctor to check:

[source,console]

$ alolipdf doctor ✓ combine compilé dans alolipdf (in-process) ✓ validate compilé dans alolipdf (in-process) ✓ sign compilé dans alolipdf (in-process) ✓ verify compilé dans alolipdf (in-process) ✓ watermark compilé dans alolipdf (in-process) ✓ info pdfinfo → /opt/homebrew/bin/pdfinfo ✓ fonts pdffonts → /opt/homebrew/bin/pdffonts

== Quickstart

[source,shell]

export P12_PASS=… # passphrase lives in an env var, not argv alolipdf combine merge a.pdf b.pdf -o book.pdf alolipdf sign -i book.pdf -o book-signed.pdf -c signer.p12 -p P12_PASS -l b-lt alolipdf verify book-signed.pdf -a trust.pem alolipdf validate book-signed.pdf -p pdf-a-2b

Everything after the subcommand is passed through verbatim, so the full flag surface is exactly each tool's own — no duplication, always in sync. Secrets are never touched: pdf-sign's passphrase/PIN convention (the name of an environment variable) flows straight through.

== Status

0.3.0: a single compiled megabinary — the five ALOLI tools in-process, poppler's info/fonts shell-out, doctor/help/version built in. A future palier may grow an installer (Homebrew tap + curl | sh) — see doc/INSTALLER.adoc.

== License

MIT — see LICENSE.

Repository

pdf-tools

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 5
  • about 1 hour ago
  • June 5, 2026
License

MIT License

Links
Synced at

Fri, 05 Jun 2026 17:47:43 GMT

Languages