From cceacbb0200913661ef0e98481d2d4956ec6a86d Mon Sep 17 00:00:00 2001 From: Robin Gower Date: Thu, 12 Feb 2026 03:19:58 +0100 Subject: [PATCH] pdftk: add example for interleaving PDFs with one-sided scans (#20927) Co-authored-by: Ivan Baluta --- pages/common/pdftk.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pages/common/pdftk.md b/pages/common/pdftk.md index 13bf7cce90..9f022554b7 100644 --- a/pages/common/pdftk.md +++ b/pages/common/pdftk.md @@ -5,20 +5,24 @@ - Extract pages 1-3, 5, and 6-10 from a PDF file and save them as another one: -`pdftk {{input.pdf}} cat {{1-3 5 6-10}} output {{output.pdf}}` +`pdftk {{path/to/input}}.pdf cat 1-3 5 6-10 output {{path/to/output}}.pdf` - Merge (concatenate) a list of PDF files and save the result as another one: -`pdftk {{file1.pdf file2.pdf ...}} cat output {{output.pdf}}` +`pdftk {{path/to/file1}}.pdf {{path/to/file2}}.pdf cat output {{path/to/output}}.pdf` - Split each page of a PDF file into a separate file, with a given filename output pattern: -`pdftk {{input.pdf}} burst output {{out_%d.pdf}}` +`pdftk {{path/to/input}}.pdf burst output {{path/to/out_%d}}.pdf` - Rotate all pages by 180 degrees clockwise: -`pdftk {{input.pdf}} cat {{1-endsouth}} output {{output.pdf}}` +`pdftk {{path/to/input}}.pdf cat 1-endsouth output {{path/to/output}}.pdf` - Rotate third page by 90 degrees clockwise and leave others unchanged: -`pdftk {{input.pdf}} cat {{1-2 3east 4-end}} output {{output.pdf}}` +`pdftk {{path/to/input}}.pdf cat 1-2 3east 4-end output {{path/to/output}}.pdf` + +- Interleave two PDFs with one-sided scans of a two-sided document, where the backs were scanned back to front: + +`pdftk A={{path/to/fronts}}.pdf B={{path/to/backs}}.pdf shuffle A1-end Bend-1 output {{path/to/output}}.pdf`