v0.6.0
版本发布时间: 2023-12-10 17:33:54
pdfcpu/pdfcpu最新发布版本:v0.8.1(2024-08-31 21:13:37)
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
- e3358c4c PDF 2.0 safe guard, fix #740, bump version
- dce50855 Fix #665, #473
- cad9003d Fix #723
- 297212bf Fix #732, #733, #734, #472, add vsenko to contr.
- d7a02315 Fix #747
- f7d021cd Fix #739
- 99643282 Fix #727
- cf3b64a4 Fix #738
- d6f60e1a Fix #737
- b34248d2 Fix #736
- 125cee27 Fix #716, add option for merging with divider
- 4f993281 Fix #722, 713
- 18073713 Add Split by page number command
- 821def59 Add viewerpref command
- 9cdf2fd3 add pagemode, pagelayout commands
- 4a2298ca Fix #717
- b4d3bd5e Fix #711
- 685340dc validate PageMode, PageLayout
- 4fbc44ea Fix #710, #635
- 04840dd2 Fix #708
- c5e44051 Fix #701
- 2a899ed3 Fix #705
- 3987bb6e Fix #706
- 5349a52d Fix layout ParsePageFormat
- b4556cce Cleanup table column paddings
- 27f04647 ColPaddings
- d298613c Fix #689
- 7a908c85 Fix #677
- d1a66fd5 Add State/Statemodel validation for TextAnnotation
- c135369f Fix #679, #680
- b42e6eba Fix #676
- 91b6234d Fix #675
1、 checksums.txt 974B
2、 pdfcpu_0.6.0_Darwin_arm64.tar.xz 3.43MB
3、 pdfcpu_0.6.0_Darwin_x86_64.tar.xz 3.86MB
4、 pdfcpu_0.6.0_Ios_arm64.tar.xz 3.4MB
5、 pdfcpu_0.6.0_Js_wasm.tar.xz 3.89MB
6、 pdfcpu_0.6.0_Linux_arm64.tar.xz 3.2MB
7、 pdfcpu_0.6.0_Linux_i386.tar.xz 3.46MB
8、 pdfcpu_0.6.0_Linux_x86_64.tar.xz 3.73MB
9、 pdfcpu_0.6.0_Windows_arm64.zip 3.73MB
10、 pdfcpu_0.6.0_Windows_i386.zip 3.96MB
11、 pdfcpu_0.6.0_Windows_x86_64.zip 4.13MB