def save(self):
        """add page info to each page (page x of y)"""
        num_pages = len(self._saved_page_states)
        for state in self._saved_page_states:
            self.__dict__.update(state)
            self.draw_page_number(num_pages)
            canvas.Canvas.showPage(self)
        canvas.Canvas.save(self)
add page info to each page (page x of y)
recipes/Python/576832_Improved_ReportLab_recipe_page_x/recipe-576832.py