Automatic (or a quick) way to add page numbers to a pdf document

Solution 1:

I've written a python script that will add page numbers to a PDF (position of your choice, font, size, etc). It's designed to work as a Quick Action (aka Service) in an Automator workflow

The Quick Action can be downloaded from here: https://github.com/benwiggy/PDFsuite/tree/master/Quick_Actions

and then move it (after unzipping) to the Services folder of your user Library. You may need to create the ~/Library/Services folder, if it doesn't exist.

The python script itself is here:

https://github.com/benwiggy/PDFsuite/blob/master/Automator_Scripts/pagenumber.py

It uses the macOS-bundled python2, so should run on any Mac from Leopard upward! The script options for size, font are on lines 88 and 89. It's configured to not put a number on page 1, which is usually a title page.