Commit b6a7402 (reverted at f8671cb) was almost correct, the PageReset should be added at the end of each stories but only if we have one more stories.
The PageReset will force the page count to be reseted at zero which means that last page of report would have been at zero.
story_cnt = 0
for node_story in node_stories:
if story_cnt > 0:
+ # Reset Page Number with new story tag
+ fis.append(PageReset())
fis.append(platypus.PageBreak())
fis += r.render(node_story)
- # Reset Page Number with new story tag
- fis.append(PageReset())
story_cnt += 1
try:
if self.localcontext and self.localcontext.get('internal_header',False):