Manipulations on pdf files


Jump to: navigation, search


Basic operations

Split a pdf into multiples files, merge different files, extract a given page... The solution is the Pdftoolkit (pdftk).


You can find useful examples at

  • Split a pdf file into multiple files
pdftk mydoc.pdf burst
  • Create a new document with only selected pages
pdftk A=input.pdf cat A1 A274-275 output output.pdf

Here the new file output.pdf will containe the pages no. 1, 274 and 275 from the original document.

Conversion from color to black and white

When you want to be sure the pdf you have to print has no color. The first solution provides better results.

gs \
-sOutputFile=output.pdf \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray \
-dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 \
-dAutoRotatePages=/None \
convert -colorspace GRAY input.pdf output.pdf

Edition / annotations

pdfedit is a free editor.

Adding watermark

Again you can use pdftk:

pdftk in.pdf background back.pdf output out.pdf 

where back.pdf is the file containing the background. If the background of the input pdf is not transparent, you have to instead use:

pdftk in.pdf stamp back.pdf output out.pdf 

More details here:

Decrease size of the file

You can use the tool qpdf, available at

qpdf --linearize input.pdf output.pdf

Source:, where other possibilities are presented.

Personal tools