Download Latest Version pdfcpu_0.11.1_Linux_i386.tar.xz (7.7 MB)
Email in envelope

Get an email when there's a new version of pdfcpu

Home / v0.9.1
Name Modified Size InfoDownloads / Week
Parent folder
checksums.txt 2024-10-24 878 Bytes
pdfcpu_0.9.1_Darwin_arm64.tar.xz 2024-10-24 3.9 MB
pdfcpu_0.9.1_Darwin_x86_64.tar.xz 2024-10-24 4.4 MB
pdfcpu_0.9.1_Js_wasm.tar.xz 2024-10-24 4.6 MB
pdfcpu_0.9.1_Linux_arm64.tar.xz 2024-10-24 3.8 MB
pdfcpu_0.9.1_Linux_i386.tar.xz 2024-10-24 4.0 MB
pdfcpu_0.9.1_Linux_x86_64.tar.xz 2024-10-24 4.4 MB
pdfcpu_0.9.1_Windows_arm64.zip 2024-10-24 4.4 MB
pdfcpu_0.9.1_Windows_i386.zip 2024-10-24 4.6 MB
pdfcpu_0.9.1_Windows_x86_64.zip 2024-10-24 4.9 MB
README.md 2024-10-24 5.3 kB
v0.9.1 source code.tar.gz 2024-10-24 267.6 MB
v0.9.1 source code.zip 2024-10-24 268.4 MB
Totals: 13 Items   575.0 MB 1

Hello dear pdfcpu user!

This release extends the image command so you can update individual images in a PDF.

It also extends the pdfcpu configuration with parameters for controlling outbound HTTP access and introduces the config version.

Moreover we introduce a config command that lets you reset the config.yml to the current major version whenever pdfcpu issues a corresponding warning or you just feel like it for other reasons.

And we have a nice extension for the booklet command and lots of fixes and parser improvements.

Let's dive right in.. 🀿

Update Images

pdfcpu images list    [-p(ages) selectedPages] -- inFile...
pdfcpu images extract [-p(ages) selectedPages] -- inFile outDir
pdfcpu images update inFile imageFile [outFile] [ objNr | (pageNr Id) ]

Using the new images command you can now update images in your PDF file.

Consider the following use case:

pdfcpu images list gallery.pdf
gallery.pdf:
1 images available (1.8 MB)
Page Obj# β”‚ Id  β”‚ Type  SoftMask ImgMask β”‚ Width β”‚ Height β”‚ ColorSpace Comp bpc Interp β”‚   Size β”‚ Filters
━━━━━━━━━━┿━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━┿━━━━━━━━━━━━
   1    3 β”‚ Im0 β”‚ image                  β”‚  1268 β”‚    720 β”‚  DeviceRGB    3   8    *   β”‚ 1.8 MB β”‚ FlateDecode

Extract all images into the current dir:

pdfcpu images extract gallery.pdf .
extracting images from gallery.pdf into ./ ...
optimizing...
writing gallery_1_Im0.png

Let's update the image with Id=Im0 on page=1 with gallery_1_Im0.png:

pdfcpu images update gallery.pdf gallery_1_Im0.png

or update the image object (#3) with logo.png:

pdfcpu images update gallery.pdf logo.png 3

or why not updating the image with Id=Im0 on page=1 with logo.jpg:

pdfcpu images update gallery.pdf logo.jpg 1 Im0

You can also dry run the command ofcourse and write to some out.pdf:

pdfcpu images update gallery.pdf gallery_1_Im0.png out.pdf
pdfcpu images update gallery.pdf logo.png out.pdf 3
pdfcpu images update gallery.pdf logo.jpg out.pdf 1 Im0

The behavior of pdfcpu images extract is the same like pdfcpu extract -mode image.

See more here and don't forget there is always pdfcpu help images.

Reset Configuration and new config command

Sometimes it is necessary to extend the pdfcpu configuration.

In such a case if you upgraded to a new release in the past you had to manually remove your config.yml and it would get upgraded on the execution of the next command on the CLI.

This is now history.

Starting with this release pdfcpu will issue a warning if your configuration needs to be upgraded:

**************************** WARNING ****************************
* Your configuration is not based on the current major version. *
*        Please backup and then reset your configuration:       *
*                     $ pdfcpu config reset                     *
*****************************************************************

The warning will only appear if the major version of the installed pdfcpu executable matches the major version of the new configuration version we are also introducing with this release:

# version (Do not edit!)
version: v0.9.1 dev

If you do not reset your configuration in this situation you are risking nasty side effects and in worst case a hard landing. Ouch..

From now on all you have to do is execute the new pdfcpu config reset command:

$ pdfcpu config reset
Did you make a backup of /Users/horstrutter/Library/Application Support/pdfcpu/config.yml ?
(yes/no): yes
Are you ready to reset your config.yml to v0.9.1 dev ?
(yes/no): yes
resetting..
Ready - Don't forget to update config.yml with your modifications.

Using the occasion we extended what you know as pdfcpu config into:

$ pdfcpu help config
usage: pdfcpu config list
       pdfcpu config reset

Make sure you also read the docs.

*** MORE TO COME! *** MORE TO COME! *** MORE TO COME! ***

Changelog

  • 1d4a5a6 Bump version
  • c703429 Fix config file handling
  • 853c877 Bump version
  • a7c32de Add warning if config.yml is outdated, add config reset cmd.
  • 22ebeff Booklet 8up orientations (#969)
  • b1b9f99 Fix [#868], add config parms offline, timeout
  • 23311b7 Fix [#859], [#965]
  • dc38554 Fix [#897]
  • 9a32118 Fix [#455]
  • bb789c7 Fix form validation
  • ac650d9 Fix [#940]
  • 9749d6d Fix [#953]
  • 8711370 Fix [#955]
  • e2a8e58 Fix [#951]
  • 84cdec0 Fix [#948]
  • 007356f Merge pull request [#947] from carlwilson/docker-entrypoint
  • 748b3cb Merge remote-tracking branch 'upstream/master' into docker-entrypoint
  • 3f7e650 FIX: Docker run command in README
  • 75f26b2 Fix [#935], Clean up
  • 0174d86 Fix Docker execution instructions in README.
  • e2441b9 Fix [#941]
  • 5677395 Use Docker ENTRYPOINT rather than CMD
Source: README.md, updated 2024-10-24