From 52fddf86b75a2c475209d72812f0b03514f31a28 Mon Sep 17 00:00:00 2001 From: fer22f Date: Tue, 28 Aug 2018 11:28:41 -0300 Subject: [PATCH] mutool: add page * convert has been used for images because draw has an arguably worse default resolution * draw has been used for text because convert outputs to out.txt instead of standard output * long parameter options aren't supported, so short ones were used --- pages/common/mutool.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/mutool.md diff --git a/pages/common/mutool.md b/pages/common/mutool.md new file mode 100644 index 000000000..59e61ff36 --- /dev/null +++ b/pages/common/mutool.md @@ -0,0 +1,23 @@ +# mutool + +> Convert PDF files, query information and extract data. + +- Convert pages 1-10 into 10 PNG images: + +`mutool convert -o {{image%d.png}} {{file.pdf}} {{1-10}}` + +- Convert pages 2, 3 and 5 of a PDF into text in the standard output: + +`mutool draw -F {{txt}} {{file.pdf}} {{2,3,5}}` + +- Concatenate two PDFs: + +`mutool merge -o {{output.pdf}} {{input1.pdf}} {{input2.pdf}}` + +- Query information about all content embedded in a PDF: + +`mutool info {{input.pdf}}` + +- Extract all images, fonts and resources embedded in a PDF out into the current directory: + +`mutool extract {{input.pdf}}`