Page breaks in PDFs

Hi Forum Friends

I have been struggling with page breaks on my PDFs. Especially getting headers and footers to show whilst not having some content that could span multiple pages.

Do you have any experience with this issue or some tips?

PS. I realize this is more of a general “How do I make the code do what I want it to do question”, but it doesn’t hurt to ask

Hi ForumFred,

I know the pdf doesnt do it automatically. I wish it was easier
I had to do it manually.

For me, I first studied the content of the pdf and what I can fit on one page. Then I continued to create logic to break the content into small datasets that I know can fit on a page. I then loop through that dataset to get the relevant content for each page. The header and footer always remain the same but usually the spacing after the header on other pages isn’t consistent, so pay attention to that.

For example if you got 200 records and in a page you can fit in 50 records. Then that is about 4 datasets in which you can loop in and create the html body for that page. You can even add page numbering using that logic.
Always test for best to worse scenario with the content so you can understand your limitation.