Page numbering

Discuss the rules of notation, standard notation practices, efficient notation practices and graphic design.
User avatar
John Ruggero
Posts: 2453
Joined: 05 Oct 2015, 14:25
Location: Raleigh, NC USA

Re: Page numbering

Post by John Ruggero »

My computer skills have now been proven less than modest.

I downloaded the PDF Services Suite, tried to open Read Me, which had a suffix that caused it to open in Calibre, and I gave up after several attempts to see the file, not having used Calibre for years.

Then I downloaded the page numberer, followed the instructions in the post above and managed to number a PDF, which appears as a new file with NUM added, very cool! But of course I now need to change the font and position. I guessed that I should now open "Add Page Numbering.workflow", which brought up Automator. This looked very daunting, but promising. Yet nothing I tried under Edit or Format did anything, which made me even sorrier that I couldn't open Read Me. Help!

Ben, does this script allow one to place numbers on desired pages only? If it does, it would be incredibly useful to me.
M1 Mac mini (OS 12.4), Dorico, Finale 25.5, GPO 4, Affinity Publisher 2, SmartScore 64 Pro, JW Plug-ins, TG Tools, Keyboard maestro

http://www.cantilenapress.com
benwiggy
Posts: 835
Joined: 11 Apr 2016, 19:42

Re: Page numbering

Post by benwiggy »

Sorry, John. Yes, it's a bit geek-orientated. The Read me doesn't need Calibre, though it might be the only thing you have to open it. You're best off looking at it on the website. It may also open in TextEdit.

You have to edit the text of the script in the main panel. (You'll have to expand the "Run Shell Script" box on the right hand side to see more of the script.) My picture may look a bit different, being on a later OS version.
Screenshot 2.png
Screenshot 2.png (151.96 KiB) Viewed 1973 times
Once you scroll down, there's a bit like this:

Code: Select all

		# OPTIONS: Set the RELATIVE distance from outside top corner of page;
		# For other uses, set the angle, scale, and opacity of text
		# Font must be the PostScript name (i.e. no spaces) (See Get Info in FontBook)
		xOffset, yOffset, angle, scale, opacity = 45.0, 28.0, 0.0, 1.0, 1.0
		font = selectFont('CenturyStd-Bold', 11.0)
Distances are in points from the outside corners.

Specified pages only would require a bit of a rewrite, as it would have to check from white/blacklist of pages each iteration. I'll have a think about it.
User avatar
John Ruggero
Posts: 2453
Joined: 05 Oct 2015, 14:25
Location: Raleigh, NC USA

Re: Page numbering

Post by John Ruggero »

Thanks so much, Ben. I was able to modify the position of the page numbers, and your script will make my life a little easier! The font was already TNR, which was appropriate in this case, but I see how to change the font and other aspects as well. Control over specific page numbers would be a nice feature, but please don't trouble yourself unduly about it.
M1 Mac mini (OS 12.4), Dorico, Finale 25.5, GPO 4, Affinity Publisher 2, SmartScore 64 Pro, JW Plug-ins, TG Tools, Keyboard maestro

http://www.cantilenapress.com
benwiggy
Posts: 835
Joined: 11 Apr 2016, 19:42

Re: Page numbering

Post by benwiggy »

John Ruggero wrote: 26 Oct 2021, 16:11 a PDF, which appears as a new file with NUM added, very cool!
All my Services that modify the PDF contents produce a new file with a new name. That way, mistakes can be corrected, and the file doesn't 'eat itself' while the job is processing.

Note that page 1 is not numbered. I ought to provide an option for that.

Currently, these scripts will work on any version from Leopard right up to Monterey, out of the box! Sadly, Apple is discontinuing python2 from future versions of the OS. In the future, the scripts will need various command line things installed for them to work, which is a shame for simplicity.
User avatar
John Ruggero
Posts: 2453
Joined: 05 Oct 2015, 14:25
Location: Raleigh, NC USA

Re: Page numbering

Post by John Ruggero »

Yes, that's exactly why I liked the production of a new file. It was fine that the first page is unnumbered. I'm still stuck in 10.12, so no worries for me at the moment about the deadly python.
M1 Mac mini (OS 12.4), Dorico, Finale 25.5, GPO 4, Affinity Publisher 2, SmartScore 64 Pro, JW Plug-ins, TG Tools, Keyboard maestro

http://www.cantilenapress.com
Post Reply