A Release Featuring Command Completion
Starting with this release, pdfcpu now offers shell command completion for CLI users.
Supported shells:
- bash
- zsh
- fish
- PowerShell
Big thanks to @doronbehar for providing the Cobra integration 🙌
CLI Improvements
This release also refines how command flags work:
-
Clear distinction between short and long flags
- Example:
-fvs--full
- Example:
-
Short flags can now be chained:
pdfcpu signatures validate signed.pdf -af
is equivalent to:
pdfcpu signatures validate signed.pdf --all --full
Tradeoff
As a result of this cleanup:
- Arbitrary abbreviation of commands and flags is no longer supported
However, the CLI is now more predictable and easier to use overall.
👉 Learn more:
pdfcpu completion --help👉 For command help going forward:
pdfcpu <command> --help🛠️ Stability & Ongoing Work
This release also represents a significant amount of work behind the scenes focused on overall stability and parser robustness. Many edge cases have been addressed to make pdfcpu more reliable when dealing with real-world PDF files.
Work on digital signature creation and validation is actively ongoing. These features will be released once the maintainers are confident they meet the expected standards for quality, correctness, and practical usefulness.
✂️ Removing Signatures (--rmsig)
This flag removes all signatures as part of processing.
Supported commands:
mergeoptimize
There is also a dedicated command:
pdfcpu signatures remove inFile [outFile]Flags:
--rmenc→ also remove encryption-h, --help→ show help
🔓 Removing Encryption (--rmenc)
The --rmenc flag removes any existing encryption when writing a file.
Supported commands:
optimizesignatures remove
🔐 Encryption
pdfcpu now supports AES-256 GCM encryption (ISO/TS 32003).
- The
encryptcommand defaults to AES-256 GCM - Supported consistently across relevant operations
🙏🏻 Thanks 🙏🏻
everybody for testing and feeding back your real world PDFs and bug reports.
Shoutouts 👏🏻 go to @mdmcconnell, @13rac1, @doronbehar and @joeyave for spending their time on submitting PR's.
Changelog
- bce7271 Cleanup, bump version
- 9db810a Enforce max recurse level during parsing
- dc9ab24 Add recover from internal panic
- 3936dce merge in cli cobra integration
- a181c19 fix: replace os.Exit with panic in library code to prevent process termination when used as dependency
- 7312d20 Fix #1329
- 39be9ac Fix #1341
- 871b367 Fix #1345
- 8f565dd Fix #1334
- d5ab3a4 Fix #1330
- c6084d1 Fix #1331
- de6e4e8 ci: include all packages in coverage with -coverpkg
- e893a96 ci: fix tests to use macOS and Windows runners
- 81a495b Fix #1307
- 01f68bd Cleanup Fix #1211
- 6fe7e7a Ignore newlines in non-multiline fields
- c4472c7 Text wrapping test
- 4c8aa9f Improved text wrapping
- 73a9f46 Implement some word wrapping for form text fields
- 4b45c54 Fix #1298
- 344bd7f Fix #1297
- 170d7bd Fix #1292
- 45f3147 Fix #1285
- b9d1197 Fix #1276
- d288782 Fix #1278
- 96ebe63 Fix #1280
- 67f5eec Fix #1261
- 59a817c Fix #1263
- 8286ba3 Fix #1255
- 1a5fcf4 Fix #1229
- 9421da0 Use sync.Once for cert loading
- f17b3d5 Fix lazy font loading
- 223cdb0 Implement lazy font loading to reduce memory footprint
- 2add6c8 Fix #642
- ce634b6 Fix #399
- 238d720 Fix #1267
- 0a7f670 Fix #1201
- 0c5a8c0 Fix #1268