Hello! 💫
This release comes ready for you to play around with during the 🎄 holidays.
It is packed with new features and the first one 🔥 dealing with PDF 2.0 (ISO 32000:2) support.
Let's get right into it..
PDF 2.0 Support
We start with basic support for validation and you can play around with the validate
and info
commands.
The work around this is ongoing and will stretch over the next couple of releases.
Please 🙏🏻 report back any issues.
CLI
There are three new commands:
Manage the page layout which shall be used when the document is opened:
pdfcpu pagelayout list inFile
pdfcpu pagelayout set inFile value
pdfcpu pagelayout reset inFile
➡️ pdfcpu help pagelayout
and pagelayout
Manage how the document shall be displayed when opened:
pdfcpu pagemode list inFile
pdfcpu pagemode set inFile value
pdfcpu pagemode reset inFile
➡️ pdfcpu help pagemode
and pagemode
Manage the way the document shall be displayed on the screen and shall be printed:
pdfcpu viewerpref list [-a(ll)] [-j(son)] inFile
pdfcpu viewerpref set inFile (inFileJSON | JSONstring)
pdfcpu viewerpref reset inFile
➡️ pdfcpu help viewerpref
and viewerpref
The split
command now also allows for splitting along page boundaries:
pdfcpu split [-m(ode) span|bookmark|page] inFile outDir [span|pageNr...]
➡️ pdfcpu help split
and split
The merge
command allows for divider pages at file boundaries and zipping two files together:
pdfcpu merge [-m(ode) create|append|zip] [-s(ort) -b(ookmarks) -d(ivider)] outFile inFile...
➡️ pdfcpu help merge
and merge
The permission
command is now more useful:
pdfcpu permissions list [-upw userpw] [-opw ownerpw] inFile...
pdfcpu permissions set [-perm none|print|all|max4Hex|max12Bits] [-upw userpw] -opw ownerpw inFile
It now also allows for conveniently setting individual PDF access bits either via a binary or hexadecimal number.
➡️ pdfcpu help permissions
and permissions
API
Thanks to @vsenko the stamp
command in combination with PDF stamps has become more powerful.
- You can set the
PDF
attribute in yourWatermark
struct with a cached reader which should save you some memory. - Multi stamping is the process where the pages of some input PDF file will be stamped one by one with the next page from a stamp PDF file, eg:
pdfcpu stamp add -mode pdf -- "stamp.pdf" "" in.pdf out.pdf
There is now a way to fine tune multi stamping eg:pdfcpu stamp add -mode pdf -- "stamp.pdf:2:3" "" in.pdf out.pdf
will initiate multi stamping at page 2 of stamp.pdf and page 3 of in.pdf
Configuration
There are three changes to the configuration:
headerBufSize
was eliminated since PDF 2.0 comes with a flexible header location specification.permissions
are now a 4 digit hex number instead of a negative integer.needAppearances
is a flag you can set for form filling.
Since the pdfcpu configuration has changed you are encouraged to recreate your config.yml:
- Locate your config.yml using
pdfcpu conf
- Remove/backup your config.yml
- Create a new config.yml from scratch by executing any pdfcpu cmd on the CLI eg. execute one more time
pdfcpu conf
- Edit your configuration
If and only if you are having fun using pdfcpu...
pdfcpu is in need of financial supporters. There are membership fees, meetings and countless hours I am putting into this project.
Please 🙏 consider supporting me in any way you can by becoming a sponsor.
Go to your superior or team lead and have them compare the benefits/costs vs. commercial solutions.
Big Thanks
🙏 to all bug reporters and PRs.
Have fun 💚 with pdfcpu!
Changelog
- e3358c4 PDF 2.0 safe guard, fix #740, bump version
- dce5085 Fix #665, #473
- cad9003 Fix #723
- 297212b Fix #732, #733, #734, #472, add vsenko to contr.
- d7a0231 Fix #747
- f7d021c Fix #739
- 9964328 Fix #727
- cf3b64a Fix #738
- d6f60e1 Fix #737
- b34248d Fix #736
- 125cee2 Fix #716, add option for merging with divider
- 4f99328 Fix #722, 713
- 1807371 Add Split by page number command
- 821def5 Add viewerpref command
- 9cdf2fd add pagemode, pagelayout commands
- 4a2298c Fix #717
- b4d3bd5 Fix #711
- 685340d validate PageMode, PageLayout
- 4fbc44e Fix #710, #635
- 04840dd Fix #708
- c5e4405 Fix #701
- 2a899ed Fix #705
- 3987bb6 Fix #706
- 5349a52 Fix layout ParsePageFormat
- b4556cc Cleanup table column paddings
- 27f0464 ColPaddings
- d298613 Fix #689
- 7a908c8 Fix #677
- d1a66fd Add State/Statemodel validation for TextAnnotation
- c135369 Fix #679, #680
- b42e6eb Fix #676
- 91b6234 Fix #675