From 6264907461f0739f8a4fa7be9fb2c1793f37e671 Mon Sep 17 00:00:00 2001 From: Jaseem Abid Date: Thu, 28 Dec 2017 15:25:37 +0530 Subject: [PATCH 1/5] Add a short tldr page for qpdf --- pages/common/qpdf.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pages/common/qpdf.md diff --git a/pages/common/qpdf.md b/pages/common/qpdf.md new file mode 100644 index 0000000000..b138957998 --- /dev/null +++ b/pages/common/qpdf.md @@ -0,0 +1,7 @@ +# qpdf + +> Versatile PDF transformation software. + +- Remove the password from a password protected file: + +`qpdf --password={{password}} --decrypt {input_file.pdf}} {{output_file.pdf}}` From d5f72e51e8751beeec7634a7fa944e31420aa944 Mon Sep 17 00:00:00 2001 From: Jaseem Abid Date: Fri, 29 Dec 2017 12:43:05 +0530 Subject: [PATCH 2/5] qpdf: Add a few more common examples --- pages/common/qpdf.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pages/common/qpdf.md b/pages/common/qpdf.md index b138957998..8ca5a58dd9 100644 --- a/pages/common/qpdf.md +++ b/pages/common/qpdf.md @@ -2,6 +2,22 @@ > Versatile PDF transformation software. +- Extract a few pages from a pdf into another one: + +`qpdf --empty --pages {{input.pdf}} 1,6-8,12 -- {{output.pdf}}` + +- Extract pages from multiple pdf files into one: + +`qpdf --empty --pages {{file 1.pdf}} 1,6-8 --pages {{file 2.pdf}} 3,4,5 -- {{output.pdf}}` + +- Write each group of n pages to a separate output file: + +`qpdf --split-pages=n {{input.pdf}} {{page %d.pdf}}` + +- Rotate and transform the PDF: + +`qpdf --rotate=+90:2,4,6 --rotate=180:7-8 {{input.pdf}} {{output.pdf}}` + - Remove the password from a password protected file: -`qpdf --password={{password}} --decrypt {input_file.pdf}} {{output_file.pdf}}` +`qpdf --password={{password}} --decrypt {{input.pdf}} {{output.pdf}}` From 24011cc085b76f15446a093f36c1eaf6fd00ecef Mon Sep 17 00:00:00 2001 From: Jaseem Abid Date: Wed, 3 Jan 2018 14:20:14 +0530 Subject: [PATCH 3/5] qpdf: Rewrite the whole file as per review comments --- pages/common/qpdf.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/common/qpdf.md b/pages/common/qpdf.md index 8ca5a58dd9..e9b710e452 100644 --- a/pages/common/qpdf.md +++ b/pages/common/qpdf.md @@ -2,21 +2,21 @@ > Versatile PDF transformation software. -- Extract a few pages from a pdf into another one: +- Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one: -`qpdf --empty --pages {{input.pdf}} 1,6-8,12 -- {{output.pdf}}` +`qpdf --empty --pages {{input.pdf}} {{1-3,5,6-10}} -- {{output.pdf}}` -- Extract pages from multiple pdf files into one: +- Merge (concatenate) a list of PDF files and save the result as another one: -`qpdf --empty --pages {{file 1.pdf}} 1,6-8 --pages {{file 2.pdf}} 3,4,5 -- {{output.pdf}}` +`qpdf --empty --pages {{file 1.pdf}} {{1,6-8}} --pages {{file 2.pdf}} {{3,4,5}} -- {{output.pdf}}` -- Write each group of n pages to a separate output file: +- Write each group of n pages to a separate output file with a given filename pattern: -`qpdf --split-pages=n {{input.pdf}} {{page %d.pdf}}` +`qpdf --split-pages=n {{input.pdf}} {{out_%d.pdf}}` - Rotate and transform the PDF: -`qpdf --rotate=+90:2,4,6 --rotate=180:7-8 {{input.pdf}} {{output.pdf}}` +`qpdf --rotate={{90:2,4,6}} --rotate={{180:7-8}} {{input.pdf}} {{output.pdf}}` - Remove the password from a password protected file: From 9dac3c20414c7ddf51ac563fcbd0d897e97d3829 Mon Sep 17 00:00:00 2001 From: Jaseem Abid Date: Wed, 3 Jan 2018 14:21:19 +0530 Subject: [PATCH 4/5] qpdf: Simplify description --- pages/common/qpdf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/qpdf.md b/pages/common/qpdf.md index e9b710e452..70a997dc3e 100644 --- a/pages/common/qpdf.md +++ b/pages/common/qpdf.md @@ -14,7 +14,7 @@ `qpdf --split-pages=n {{input.pdf}} {{out_%d.pdf}}` -- Rotate and transform the PDF: +- Rotate certain pages of a pdf with a given angle: `qpdf --rotate={{90:2,4,6}} --rotate={{180:7-8}} {{input.pdf}} {{output.pdf}}` From f178e85efcaccf7a7bfb30deeee18457ecd00886 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 3 Jan 2018 14:30:33 +0530 Subject: [PATCH 5/5] qpdf: remove spaces --- pages/common/qpdf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/qpdf.md b/pages/common/qpdf.md index 70a997dc3e..244017509a 100644 --- a/pages/common/qpdf.md +++ b/pages/common/qpdf.md @@ -8,7 +8,7 @@ - Merge (concatenate) a list of PDF files and save the result as another one: -`qpdf --empty --pages {{file 1.pdf}} {{1,6-8}} --pages {{file 2.pdf}} {{3,4,5}} -- {{output.pdf}}` +`qpdf --empty --pages {{file1.pdf}} {{1,6-8}} --pages {{file2.pdf}} {{3,4,5}} -- {{output.pdf}}` - Write each group of n pages to a separate output file with a given filename pattern: