You have a PDF document and want to add page numbers to it.
Requires texlive-core, pdftk.
On Arch Linux, these can be installed by running $ sudo pacman -S texlive-core pdftk
- Count the pages of your document you want to add page numbers to.
- Then run the script:
sh number_pdf.sh [number of pages] [input pdf] [output pdf]
.
- You have a document named
my_doc.pdf
that has 101 pages. $ sh number_pdf.sh 101 my_doc.pdf my_doc_with_numbers.pdf
- Your numbered document is called
my_doc_with_numbers.pdf
.
Adapted by Max from http://www.cazencott.info/index.php/post/2015/04/30/Numbering-PDF-Pages