I would like to render PDF page base on the amount of record I retrieve using SOQL.
example If I have 10 invoice forms, I should be able to render 10 pages in 1 PDF.
I would like to render PDF page base on the amount of record I retrieve using SOQL.
example If I have 10 invoice forms, I should be able to render 10 pages in 1 PDF.
Best Answer
This is possible with having some extra
css
.Wrap your invoice data with a div and introduce css class as below
page-break
css class help you to start every new child of your list in a new page. And in above.page-break:first-child
is for avoiding generating empty first page.@page
is an additional but thought to add it since in this kind of scenario it's valuable. It's giving you in which page are you out of how many pages.