function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rvkrvk 

How to add page break for renderAS pdf

I have developed a vf page to render it As pdf. With in the pdf  i need to add page break to end the page with couple of sections and should continue next section from new  page.Is there any way I could do that.

 

bob_buzzardbob_buzzard

The best resource for PDF production that I've seen is this wiki article from Quinton Wall.  It covers page breaks and much more besides:

 

http://wiki.developerforce.com/index.php/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce

Ankit AroraAnkit Arora

You can use any of the below :

 

<div style="page-break-after:always;"/>

<div style="page-break-before:always;"/>

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

rvkrvk

Thanks Guys. i am having issue with the alignment of fields and their values in the pdf, it looks great in vf page but when renderAs  in to pdf all feild alignment gets mess up.Any idea.

Ankit AroraAnkit Arora

Source provided by Bob is best to fix the alignment issues. You can also apply custom css using @page.

 

Please refer : http://wiki.developerforce.com/index.php/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

beco fuanbeco fuan
Please have a look at PDF pages add in (http://www.rasteredge.com/how-to/csharp-imaging/pdf-insert/) guide.