You can use the PDF printer's watermark function to add page numbers to the same document when it is printed.
Here's an example of how to use the <pageno> and <pagecount> macro tags in the PDF printer's "Watermark" tab to do this. This can be found in the "Options dialog window" of the PDF printer. Before printing on our PDF printer, you make these adjustments in order to then add the page number to the PDF later when printing on existing documents.
You can call up the options dialog under Windows 10 via the Windows 10 search like this... simply type 7-PDF Printer Options into the search field...
Under the Watermark tab, set the following values or use the above-mentioned contents of the PDF printer's macro tags.
These settings produce output with page numbers in the lower right corner. You can also adjust the design accordingly so that it appears more like a classic page number formatting in the document. The example should only show you what is possible!
The configuration for watermarks can also be done directly in the configuration files with the following settings:
watermarktext=TEST PAGE NO OF watermarkfontsize=20 watermarkrotation=90 watermarkcolor=#4F4F4F watermarkfontname=ARIALNB.TTF watermarkoutlinewidth=0 watermarklayer=top watermarkverticalposition=bottom watermarkhorizontalposition=right watermarkverticaladjustment=1 watermarkhorizontaladjustment=1