Yes. The first example in chapter 5 of the user guide , SimpleDocTemplate has two hooks:
doc.build(Story, onFirstPage=myFirstPage, onLaterPages=myLaterPages)
Just change the definition of myLaterPages to conditionally print the page number.
source
share