PDF - Extract pages from pdf files, make greyscale, print to PDF from acroread, merge pdfs

Install pdftk and use it to extract:

sudo bash
apt-get install pdftk

pdftk input.pdf cat 1-15 output output.pdf

(where 1-15 are the pages to output)

An alternative way is to use a pdf viewer like Atril or a web browser with support for pdf:s like Chrome and print the pdf file to a new pdf with selected pages specified.

More ways to do it can be found here: http://www.linuxjournal.com/content/tech-tip-extract-pages-pdf

To make PDF:s greyscale and therefore smaller:

gs -sOutputFile="output.pdf" -sDEVICE=pdfwrite -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH "input.pdf"

Acrobat Reader 9 (acroread) - Print to PDF

For some reason you cannot (re)print directly to PDF from within acroread in Debian (8.6).

Here is a workaround.

Install cups-pdf:

sudo apt-get install cups-pdf

List printer names - PDF will be shown here and also installed printers:
lpstat -p -d

Open the PDF you want to print in acroread

Go to File -> Print

Select PDF as the output
Or use Custom... and enter this in the command field to the right:
lpr -P PDF

Printed files will appear in your home folder/PDF (~/PDF/)

Merge PDFs

pdftk *.pdf cat output output.pdf

This is a personal note. Last updated: 2022-01-18 12:55:44.


Don't forget to pay my friend a visit too. Joakim