cat
Concatenate pages from input PDFs into a new PDF
Usage
pdftl
<input>...cat<spec>...output<file>[<option>...]
Details
The cat operation is used to assemble pages from one or more PDFs.
Input PDFs can be assigned to handles (e.g., A=one.pdf B=two.pdf).
Each spec may refer to these handles to select pages or page ranges.
When no handle is specified, the first input file is used.
Considerable effort is made to do “the right thing” as regards
hyperlinks and any outlines (table of contents). Since cat is quite
flexible, exactly what the right thing is sometimes not clearly
defined, but nevertheless if you do get a clearly incorrect output,
then please report it as a bug.
Examples
Concatenate two entire files
pdftl A=doc1.pdf B=doc2.pdf cat A B output combined.pdf
Select a range of pages from one file:
pdftl in.pdf cat 1-5 9-end output partial.pdf
Double the size of pages 1-5 and rotate east. Zoom out (e.g., A4 to A3) and turn pages 9-end left.
pdftl in.pdf cat 1-5x2east 9-endleftz-1 output partial.pdf
Concatenate pages 1-5 from a.pdf with pages 3,6,9,… from b.pdf
pdftl A=a.pdf B=b.pdf cat A1-5 B3-endstep3 output result.pdf
Tags: from_scratch, page_order
Source: pdftl.operations.cat
Read online: https://pdftl.readthedocs.io/en/stable/operations/cat.html
Type: Operation