You need to sign in to do that
Don't have an account?
Jina Chetia
How to give page breaks in a VisualForce page rendered as a pdf?
Hi,
I have a Visual Force page which I am rendering as a pdf. I want to add page breaks to the pdf file because if the page is longer than 1 page it just splits up the page wherever it runs over. Is there any way I can control this?
Thanks
Jina
I have a Visual Force page which I am rendering as a pdf. I want to add page breaks to the pdf file because if the page is longer than 1 page it just splits up the page wherever it runs over. Is there any way I can control this?
Thanks
Jina
Hey, I'm running into the same issues with the pdf feature. I have the beginnings of a solution, so it may or may not help.
This code takes the content in the different divs and puts it on its own page. It still splits the content where needed, but as you can see in the left and right page examples, you can explicitly break content among pages where needed.
<div style="page-break-after:always;">
content of page one here
</div>
the rest. please post and let us know if that works.
I am to be able to repeat the header information (displayed using <PANELGRID>) in all pages. But in the detail since I am using <DATATABLE> and if there are several records, I am not able to repeat any header information on to next page.
Can anyone suggest a way to repeat header information on all pages.
<div style="page-break-after:always;">
content of page one here
</div>
but my requiremnet is to dynamically give these page breaks once the lenght of page exceeds 1 page or else it should come in one page? Got an idea how to achieve this?
Sometimes my answere in following thread will be helpful for you.
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=16400&jump=true#M16400
I know this is an older post, but wanted to share in case others are still looking for a solution. I was having a similar issue but instead of putting in page breaks, I took a different route and gave my sections the page-break-inside: avoid; style. This kept my sections together and gave me clean breaks.