1

I am using a shell script to modify many pdfs and would like to create a script that adds the page number (1 of X format) to the bottom of PDFs in a directory along with the text of the filename.

I tried using pdfjam with this format:

pdfjam --pagenumbering true

but it fails saying undefine pagenumbering

Any other recommendations how to do this? I am OK installing other tools but would like this to all be within a shell script.

Thank you

AAA
  • 2,388
  • 9
  • 32
  • 47

1 Answers1

3

tl;dr: pdfjam --pagecommand '' input.pdf

By default, pdfjam adds the following LaTeX command to every page: \thispagestyle{empty}. By changing the command to an empty command, the default plain page style is used, which consists of a page number at the bottom. Of course you may want to play with other styles or layout options to position the page number differently.