When dealing with administrative paperwork, it is usually desirable to merge several PDF files and optionally add page numbers to the output PDF document. A solution based on Makefile and a BASH script is proposed here.
Prerequisites
The following dependencies have to be resolved :
- make
- pdftk
- gs
- enscript
Notice that the prerequisites are usually provided as packages with common GNU/Linux distributions.
Download and execution
Download and unzip the file.
Go into the directory and type make. A directory out should have been created with the following content :
- sortie.pdf is the concatenation of the PDF files provided in the parent directory.
- sortie-num.pdf is a page-numbered version of the previous file.
- sortie-num-comp.pdf is a compressed version of the previous file.
If the result of this run is correct, replace example PDFs by yours.