I\'m trying to add a simple \"page x of y\" to a report made with ReportLab.. I found this old post about it, but maybe six years later something more straightforward has em
Just digging up some code for you, we use this:
SimpleDocTemplate(...).build(self.story,
onFirstPage=self._on_page,
onLaterPages=self._on_page)
Now self._on_page is a method that gets called for each page like:
def _on_page(self, canvas, doc):
# ... do any additional page formatting here for each page
print doc.page