MyGit

v0.6.0

pdfcpu/pdfcpu

版本发布时间: 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.

  1. You can set the PDF attribute in your Watermark struct with a cached reader which should save you some memory.
  2. 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:

  1. headerBufSize was eliminated since PDF 2.0 comes with a flexible header location specification.
  2. permissions are now a 4 digit hex number instead of a negative integer.
  3. needAppearances is a flag you can set for form filling.

Since the pdfcpu configuration has changed you are encouraged to recreate your config.yml:

  1. Locate your config.yml using pdfcpu conf
  2. Remove/backup your config.yml
  3. Create a new config.yml from scratch by executing any pdfcpu cmd on the CLI eg. execute one more time pdfcpu conf
  4. 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

相关地址:原始地址 下载(tar) 下载(zip)

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

查看:2023-12-10发行的版本