2017-12-28 15:25:37 +05:30
|
|
|
# qpdf
|
|
|
|
|
|
|
|
> Versatile PDF transformation software.
|
2019-05-23 11:56:50 +01:00
|
|
|
> More information: <https://github.com/qpdf/qpdf>.
|
2017-12-28 15:25:37 +05:30
|
|
|
|
2018-01-03 14:20:14 +05:30
|
|
|
- Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one:
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
`qpdf --empty --pages {{path/to/input.pdf}} {{1-3,5,6-10}} -- {{path/to/output.pdf}}`
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
- Merge (concatenate) all the pages of multiple PDF files and save the result as a new PDF:
|
2019-06-25 06:26:09 +02:00
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
`qpdf --empty --pages {{path/to/file1.pdf file2.pdf ...}} -- {{path/to/output.pdf}}`
|
2019-06-25 06:26:09 +02:00
|
|
|
|
|
|
|
- Merge (concatenate) given pages from a list of PDF files and save the result as a new PDF:
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
`qpdf --empty --pages {{path/to/file1.pdf}} {{1,6-8}} {{path/to/file2.pdf}} {{3,4,5}} -- {{path/to/output.pdf}}`
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
- Write each group of `n` pages to a separate output file with a given filename pattern:
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
`qpdf --split-pages={{n}} {{path/to/input.pdf}} {{path/to/out_%d.pdf}}`
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Rotate certain pages of a PDF with a given angle:
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
`qpdf --rotate={{90:2,4,6}} --rotate={{180:7-8}} {{path/to/input.pdf}} {{path/to/output.pdf}}`
|
2017-12-29 12:43:05 +05:30
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Remove the password from a password-protected file:
|
2017-12-28 15:25:37 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
`qpdf --password={{password}} --decrypt {{path/to/input.pdf}} {{path/to/output.pdf}}`
|