JPDFNum is a Java program I wrote to add page numbers to PDF files. I was helping to organize a student conference, and was in charge of getting the proceedings published. This required me to compile many PDFs into a single PDF, and also to add page numbers to each. Doing this manually is a nightmare, so I wrote this program to automate the process. It was quite easy to do using the iText Library, as well as the tips on this blog post. The source code is a cobbled together mess, but if you would like it, just send me an email.
NOTE: Right now the page numbers can only be added to the bottom of the page and centered.
Usage: JPDFNum [switch opt] <inputpdf> <outputpdf> where [switch opt] is any of the following switch options: -y : specify the y-offset in points of the page number from the bottom of the page. -f : specify the font-face. Can be one of the following: Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Symbol Times-Bold Times-BoldItalic Times-Italic Times-Roman ZapfDingbats -F : specify the font-size in points. -R : Use roman numerals. -s : Start number on the page specified. -e : Stop numbering on the page specified. -p : Start the page counter at the value specified. Example: ./JPDFNum.jar -y 35 -f Courier -F 12 -s 10 in.pdf out.pdf
JPDFNum is written entirely in Java. As such the executable jar files provided here should run on any platform supporting Java 1.5+.