For a recent job application, I needed to combine several pdf files into a single one and to number its pages afterwards. I already knew that I would be able to use PDFtk, a smart CLI tool I mentioned in a previous note to combine the pdf files but I was not sure how to proceed for the page numbering. Turns out that PDFtk is also useful for this too!
It is relatively easy to find short tutorials that explain how to combine pdf
files with PDFtk, for instance, there is a very good one on Make Tech
Basically, it is a simple call to the command
cat of PDFtk:
For the page numbering, I found an interesting post by Dr. Chloé-Agathe
but I used a slightly different approach. As Dr. Azencott did, I created
number.pdf, an empty document with pages numbered (my final document had 15
pages, so I created
number.pdf with 15 pages) and then I used the
multibackground argument of PDFtk concisely introduced in the
Finally, I combined these two steps in the following
makefile so that I could rebuild my application with
Hope this could be useful!