Merge Pdf Files

pdftk is a powerful tools to rearrange pdf files, especially when merging pdf files after scanning. If your scanner cannot make double-side scanning, you will have to scan your double-side documents into separate files first. Then you need merge both files into a single pdf file. These two files will have the same number of pages. All you need is to go through two files alternatively, one file from first page to the last page. The second file need start from the last page to the first page. The merged files will take pages from each files alternatively, like the zip function in Python.

The command to merge these two files is the following,

pdftk A=first_file.pdf B=second_file.pdf shuffle A1-end Bend-1 output merged_file.pdf

pdftk can be installed on ubuntu easily with apt-get command.

sudo apt-get install pdftk

There are lots of useful sub-commands from pdftk. You can refer to its man page for details. Here is another example from a personal blog page.

Reorder Pages

pdfshuffler is a good tool in Ubuntu to re-order pdf pages. Install it with apt-get.

$ apt-get install pdfshuffler

It is a GUI tool. After it is started and in its graphic interface, you can easily organize page order with mouse.

results matching ""

    No results matching ""