pdftools
compose multiple def files
pdftk input01.pdf input02.pdf cat output output.pdf
Cut a pdf file
how to cut a pdf file with 4 pages on each side ordered like:
1 | 3 |
2 | 4 |
mutool poster -x 2 original.pdf buffer.pdf
mutool poster -y 2 buffer.pdf cutted_version.pdf
as a script:
#!/bin/bash
if [ $# -ne 2 ]
then
echo usage $0 "<pdf_file> <output_file>"
exit 1
fi
mutool poster -x 2 "$1" .buffer.pdf
mutool poster -y 2 .buffer.pdf "$2"
rm .buffer.pdf
shrink a pdf file
to shrink a pdf file you can use ghostscript:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -sOutputFile=output.pdf input.pdf
for -dPDFSETTINGS you can use the following setings:
- /screen
- /ebook
- /printer
- /prepress
compose multiple pages per sheet
via pdfnup (from package pdfjam):
pdfnup --nup 1x2 --no-landscape input.pdf
automatically crop pdf files
via pdfcrop (provided from package texlive-extra-utils)
pdfcrop input.pdf output.pdf