MyGit

v0.4.0

pdfcpu/pdfcpu

版本发布时间: 2023-03-01 08:15:36

pdfcpu/pdfcpu最新发布版本:v0.8.0(2024-04-25 06:27:50)

Hello, the main focus of this release is PDF form management!

This release has been a long time coming 😓 Thank you 🙏 for your patience!


API-Users, please proceed with caution! The codebase has been refactored heavily and there may be some side effects.

E.g. usages of: api.Merge(rsc []io.ReadSeeker,...) need to be migrated to api.MergeRaw(rsc []io.ReadSeeker, ...)


pdfcpu v0.4.0 is now based on go1.20 and comes with two new commands:

  1. The new powerful formcommand solves all major form handling usecases:
pdfcpu form list   inFile...
pdfcpu form remove inFile [outFile] fieldID...
pdfcpu form lock   inFile [outFile] [fieldID...]
pdfcpu form unlock inFile [outFile] [fieldID...]
pdfcpu form reset  inFile [outFile] [fieldID...]
pdfcpu form export inFile [outFileJSON]
pdfcpu form fill inFile inFileJSON [outFile]
pdfcpu form multifill [-m(ode) single|merge] inFile inFileData outDir [outName]

DISCLAIMER 1 You are free to export and fill already existing PDF forms - this may or may not work! Feel free to open an issue and we may be able to make it work.


DISCLAIMER 2 All forms generated with pdfcpu create are optimized for Adobe Reader. Mac Preview is not suited well for form handling!


The following workflows are supported:

The Regular Workflow


The Fill & Merge Workflow

"Give me access to your contacts db and I will generate a single PDF containing a page sequence of contact sheets"

This usecase is implemented by extending the regular workflow by an additional integrated merge step.

As for automatically filling a form with your data pdfcpu gives you two options:


  1. The new resize command comes to the rescue when you're stuck with some large pages in front of a regular small form printer:
pdfcpu resize [-p(ages) selectedPages] -- [description] inFile [outFile]

Scale your pages up or down or resize to one of the many supported standard form sizes (pdfcpu paper prints a list ) optionally enforcing portrait or landscape mode:

Examples:

         pdfcpu resize "scale:2" in.pdf out.pdf
            Enlarge pages by doubling the page dimensions, keep orientation.

         pdfcpu resize -pages 1-3 -- "sc:.5" in.pdf out.pdf
            Shrink first 3 pages by cutting in half the page dimensions, keep orientation.

         pdfcpu resize -u cm -- "dim:40 0" in.pdf out.pdf
            Resize pages to width of 40 cm, keep orientation.

         pdfcpu resize "form:A4" in.pdf out.pdf
            Resize pages to A4, keep orientation.

         pdfcpu resize "f:A4P, bgcol:#d0d0d0" in.pdf out.pdf
            Resize pages to A4 and enforce orientation(here: portrait mode), apply background color.

         pdfcpu resize "dim:400 200" in.pdf out.pdf
            Resize pages to 400 x 200 points, keep orientation.

         pdfcpu resize "dim:400 200, enforce:true" in.pdf out.pdf
            Resize pages to 400 x 200 points, enforce orientation.

Countless bugs have been rolling in and many of those have been fixed. Thank you 🙏 all also for your PRs 👍 💚 Unfortunately due to heavy refactoring of the code base some of them had to be merged in manually or still will be.

Changelog

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

1、 checksums.txt 782B

2、 pdfcpu_0.4.0_Linux_arm64.tar.xz 3MB

3、 pdfcpu_0.4.0_Linux_i386.tar.xz 3.3MB

4、 pdfcpu_0.4.0_Linux_x86_64.tar.xz 3.52MB

5、 pdfcpu_0.4.0_macOS_arm64.tar.xz 3.22MB

6、 pdfcpu_0.4.0_macOS_x86_64.tar.xz 3.63MB

7、 pdfcpu_0.4.0_Windows_arm64.zip 3.49MB

8、 pdfcpu_0.4.0_Windows_i386.zip 3.77MB

9、 pdfcpu_0.4.0_Windows_x86_64.zip 3.87MB

查看:2023-03-01发行的版本