The search for real page numbers
If you are like me you spent the first little while in Google Docs searching for what you thought would be obvious. An ‘insert field’ or an ‘insert page numbers’ menu item.
Eventually you would have found, under the File > Print Settings dialogue, the option to include page numbers when printing. It would have been surprising if an online document that includes the ability to create your own automatic table of contents didn’t also allow you to show page numbers.
However, this has a couple of limitations. If you have set up any sort of style for your document, you’ll be frustrated that the page number just gets ‘popped in’ at the last minute when printed and that you can’t control the styling of it.
Additionally, this doesn’t tell your reader how many pages are in your document. We all know every document out there is a thrilling read, but it doesn’t hurt to give a hint as to how much more reading there is to do.
So, what’s the answer?
A little digging about in Google’s massive help centre came up with the answer. But this isn’t for the faint of heart. Or, at least not for those without a little HTML experience.
The Google Docs Footer
To start with, you’ll need to add a footer to your Google Doc.
Select Insert > Footer
You can also insert and customise headers in exactly the same way, but we’ll stick to footers for the sake of simplicity.
Keep in mind that the Google Doc footers don’t work like most word-processing footers. You’ll only see it at the bottom of the online document. You won’t see it working as a footer until in print preview (or once it prints out).
Google Docs Footer Extras
Now that you’ve got your footer inserted, it’s time to delve into the HTML. I would recommend first trying this all out on a dummy document – or at least something unimportant.
Select Edit > Edit HTML
You can either edit the HTML in the Google Docs window or copy and paste it into a text editor. Whichever is easier for you.
Start by finding the default Google Docs Footer in the HTML:
<div id="google_footer" class="google_footer"> <p> </p> </div>
In between the <p> tags, write in your own content and copy in the HTML for page numbering and/or count (shown below).
HTML to copy in for the page numbering:
HTML to copy in for the page count:
In my case, I usually put in both, so that the HTML ends up looking a little like:
<div id="google_footer" class="google_footer"> <p>My brightcookie.com footer, Page <span class="google_pagenumber">1</span> of <span class="google_pagecount">1</span></p> </div>
Take a look at our un-styled working example of a Google Doc with the Footer extras.
Styling your Google Docs Footer
This is as easy or as difficult as editing CSS. Once again, this isn’t for someone without any CSS experience.
You’ll need to set up a style for the different classes referred to in the default Google footer, not create your own class. To access and edit the CSS:
Select Edit > Edit CSS
I won’t go into the full details on editing CSS, but if you go down this path, I would recommend copying the CSS and pasting it into a good text editor. You can see better what you’re editing and you can keep an offline back up of the original CSS in case you need to revert to it.
Google Docs – what else do you want to do?
There is a surprising amount more to Google Docs than first meets the eye. If you have the time, it’s definitely worth making a visit to Google Docs Help. Of course, next time I find something I have found useful personally, I’ll be sharing it here.