MyGit

v0.8.0

pdfcpu/pdfcpu

版本发布时间: 2024-04-25 06:27:50

pdfcpu/pdfcpu最新发布版本:v0.8.1(2024-08-31 21:13:37)

Maintenance Release

PDF 2.0 Support

PDF 2.0 encryption is now supported and you are free to use the following commands with your PDF 2.0 input files:

Performance

We can report another 🚀 @fancycode parser improvement resulting in a significant performance boost and lower memory overhead especially for large files:

Before:

$ time go run test.go 
2024/03/21 09:03:55.874443 Parsing ...
2024/03/21 09:04:07.947987 Done, uses 4244 MiBytes heap memory, 6755 MiBytes system memory
2024/03/21 09:04:07.948013 Parsed 1133 pages

real	0m12,743s
user	0m21,830s
sys	0m2,589s

After:

$ time go run test.go 
2024/03/21 09:04:30.639673 Parsing ...
2024/03/21 09:04:30.899588 Done, uses 12 MiBytes heap memory, 11 MiBytes system memory
2024/03/21 09:04:30.899609 Parsed 1133 pages

real	0m0,568s
user	0m0,881s
sys	0m0,228s

Configuration Changes

We have added options to skip some optimization steps or disable internal optimization alltogether:

If you disable the following option there will be no internal optimization of the cross reference table once it is loaded into memory. This will only affect commands that do not rely on optimization like e.g. optimize

# toggle optimization
optimize: true

The following will disable the parsing of page content streams in order to detect unused resources like images or fonts.

# optimize page resources via content stream analysis.
optimizeResourceDicts: true

The following option decides if pdfcpu will scan for and remove duplicate content streams.

# optimize duplicate content streams across pages.
optimizeDuplicateContentStreams: false

⚡ Caution is advised and you have to know what you are doing when using these options. Tuning or turning optimization off can make sense in environments where you deal with large PDF files that usually look the same structure wise so there are no surprises.

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

Thanks

for all of you test driving pdfcpu and reporting 🐛 s along the way. Special PR thanks 👍🏻 also to @adamgreenhall for improving the booklet command and to @xelan as well.

Changelog

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

1、 checksums.txt 878B

2、 pdfcpu_0.8.0_Darwin_arm64.tar.xz 3.57MB

3、 pdfcpu_0.8.0_Darwin_x86_64.tar.xz 4.05MB

4、 pdfcpu_0.8.0_Js_wasm.tar.xz 4.23MB

5、 pdfcpu_0.8.0_Linux_arm64.tar.xz 3.45MB

6、 pdfcpu_0.8.0_Linux_i386.tar.xz 3.71MB

7、 pdfcpu_0.8.0_Linux_x86_64.tar.xz 4.01MB

8、 pdfcpu_0.8.0_Windows_arm64.zip 4.02MB

9、 pdfcpu_0.8.0_Windows_i386.zip 4.24MB

10、 pdfcpu_0.8.0_Windows_x86_64.zip 4.44MB

查看:2024-04-25发行的版本