tldr/pages/common/qpdf.md

25 lines
820 B
Markdown
Raw Normal View History

2017-12-28 09:55:37 +00:00
# qpdf
> Versatile PDF transformation software.
2019-05-15 09:35:27 +01:00
> Homepage: <https://github.com/qpdf/qpdf>.
2017-12-28 09:55:37 +00:00
- Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one:
2017-12-29 07:13:05 +00:00
`qpdf --empty --pages {{input.pdf}} {{1-3,5,6-10}} -- {{output.pdf}}`
2017-12-29 07:13:05 +00:00
- Merge (concatenate) a list of PDF files and save the result as another one:
2017-12-29 07:13:05 +00:00
2018-01-03 09:00:33 +00:00
`qpdf --empty --pages {{file1.pdf}} {{1,6-8}} --pages {{file2.pdf}} {{3,4,5}} -- {{output.pdf}}`
2017-12-29 07:13:05 +00:00
- Write each group of n pages to a separate output file with a given filename pattern:
2017-12-29 07:13:05 +00:00
`qpdf --split-pages=n {{input.pdf}} {{out_%d.pdf}}`
2017-12-29 07:13:05 +00:00
2018-01-03 08:51:19 +00:00
- Rotate certain pages of a pdf with a given angle:
2017-12-29 07:13:05 +00:00
`qpdf --rotate={{90:2,4,6}} --rotate={{180:7-8}} {{input.pdf}} {{output.pdf}}`
2017-12-29 07:13:05 +00:00
2017-12-28 09:55:37 +00:00
- Remove the password from a password protected file:
2017-12-29 07:13:05 +00:00
`qpdf --password={{password}} --decrypt {{input.pdf}} {{output.pdf}}`