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
mdelgadomdelgado 

PDF generation

Hello,

 

I have a visual force page that renders content for a PDF.  The visual force code uses apex:repeat to display a table (for each entity) that contains data and a associated generated graph.  The problem I am encountering is that typically 3 tables will normally fit on a page, but depending on what the text on one of the table columns is, the rendered table and associated graph are split between pdf pages.  How can I format it so that the pdf table clontent starts on a page?

 

Please make suggestions.

 

thanks,

 

Mirko

Best Answer chosen by Admin (Salesforce Developers) 
mdelgadomdelgado

Thank worked, thanks!

 

Mirko

All Answers

colemabcolemab

For PDF or HTML files generated from VF page, you want to look into the CSS property called:

page-break-inside:avoid;
mdelgadomdelgado

Thank worked, thanks!

 

Mirko

This was selected as the best answer