Beyond conversion: sign, merge, optimize and exchange.
Generating the PDF is only part of most document workflows. PD4ML includes a PDF toolkit for existing files, as Java APIs and command-line tools: digital signatures, merging, optimization and form data exchange, built on a low-level PDF object model you can use directly.
For invoicing, PD4ML writes ZUGFeRD and Factur-X hybrid invoices: a PDF/A-3 document with the machine-readable XML inside.
Five packages for existing PDFs.
The toolkit came with PD4ML v4.0.23fx2 and v4.1.1, and is part of every edition.
Digital signatures
com.pd4ml.pdf.sign: sign with PKCS#12 files, PKCS#11 hardware tokens, HSMs and cloud KMS providers, with RFC 3161 timestamps, DocMDP certification and PAdES-LT/LTV.
Merge with tags
com.pd4ml.pdf.merge: combine page ranges from several PDFs into one document. Accessibility tagging is merged too, so PDF/A and PDF/UA files stay tagged.
Optimize and linearize
com.pd4ml.pdf.optimizer: remove unreferenced objects, deduplicate identical content, collapse incremental updates, and write linearized "Fast Web View" files (v4.2).
XFDF import and export
com.pd4ml.pdf.xfdf: move annotations and form data in and out of PDFs as XFDF (ISO 19444-1).
Low-level object model
com.pd4ml.pdf.cos: the parser, object model and writer behind the toolkit, for your own structural edits. It also reads Brotli-compressed streams.
Command-line tools
Signing, merging, optimizing and XFDF are also available as command-line tools for scripts and batch jobs.
ZUGFeRD and Factur-X from your invoice HTML.
More and more EU countries require structured e-invoices between businesses. PD4ML turns your existing invoice template into a hybrid e-invoice.
- A PDF/A-3 invoice with the XML embedded: people read the PDF, and accounting software reads the ZUGFeRD or Factur-X data.
- Presets for the PDF/A-3 container, with explicit control over the PDF standard and an error policy that rejects non-conforming output (v4.1.0).
- Signed and archived: combine it with the signing API for tamper-evident invoices that are ready for long-term archiving.
- Part of the DMS and UA editions. See ZUGFeRD and Factur-X invoices.
Generate, merge, sign, in one JVM.
There's no external PDF tool and no native library to deploy: generation and post-processing run in the same Java process as your application.
Signing keys stay where they are: on a PKCS#11 token or HSM the key never leaves the device, and a cloud KMS plugs in through a one-method RemoteSigner interface.
# merge a cover letter with page 2 onwards of a report java -cp pd4ml.jar com.pd4ml.pdf.merge.cli.Pd4MergeCli \ --in=cover.pdf --in=report.pdf --pages=2+ \ --out=bundle.pdf # sign it with a timestamp and long-term validation data java -cp "pd4ml.jar:bouncycastle-runtime-1.84.jar" \ com.pd4ml.pdf.sign.cli.PdfSignCli sign bundle.pdf signed.pdf \ --p12=company.p12 --password=*** \ --tsa=http://timestamp.digicert.com --ltv
Features marked v4.2 are part of the PD4ML v4.2.0 development snapshot: download it from the Downloads page or use 4.2.0-SNAPSHOT from the Maven repository. The other features are in the current releases, PD4ML v4.1.2 and v4.0.24. The release notes and What Is New in PD4ML v4.2.0 list every change.
Explore the other improvements
Put the whole document workflow in one library.
Download PD4ML and try signing, merging and e-invoicing with a free evaluation license.
