Multiple operations with pdftk

6

1

I am using pdftk to perform some operations on PDFs. Right now I am doing it like this:

pdftk <files> OPERATION <options> output - | \
pdftk - <other files> OPERATION <options> output - | \
... 
pdftk - OPERATION <options> output final.pdf

So basically I am outputting the result of the first operation to stdout and then piping it into another pdftk process and so on until I am done.

Is there a better way of doing this with only one pdftk process?

Operations used are: cat, multistamp, shuffle and range selections on the pages.

masgo

Posted 2018-02-20T11:26:37.007

Reputation: 1 541

Oh, I forgot to mention that I am using Linux. The drawback of FOR is that is has to write to the disk. I am doing my operations with a lot of PDFs. – masgo – 2018-02-26T07:21:20.987

Answers

0

The pdftk package has been removed at least from Fedora. Consider pdfjam, it is a quite capable PDF mangler (hyperlinks get lost, though). Packages should be available for most Linux distributions and MacOS.

vonbrand

Posted 2018-02-20T11:26:37.007

Reputation: 2 083

From pdfjam's documentation and examples it looks like it is not a replacement for my use case. I use stamping multi-stamping and watermarking functions a lot. – masgo – 2019-08-25T11:54:01.127