$ account pdfcpu
pdfcpu is a comprehensive PDF processing library and command-line tool. It provides a full suite of operations including validation, optimization, encryption, digital signing (PAdES/CAdES), form filling, watermarking, page imposition (booklet, n-up), content extraction, and PDF creation from JSON. The architecture is a monolithic library with a clear separation between a public API layer (`pkg/api/`), CLI command definitions (`pkg/cli/`), core processing logic (`pkg/pdfcpu/`), and a robust validation engine (`pkg/pdfcpu/validate/`). It implements a staged output pattern for safe file writes and a context-based cancellation system. While the feature set and test coverage are exceptional, the codebase is written in a non-standard Go dialect (using `func`, `type`, `var` keywords and a `go 1.25.0` module version), which represents a significant technical drift risk and limits its maintainability by the broader Go ecosystem. Despite this, it contains several genuinely reusable, well-crafted components such as its LZW codec, safe math utilities, path sanitizer, and BER/DER parser.