I am creating pdf file from VF page. I have a requirement to show data of different month on a separate page. I am getting data in a single list from the controller. How can I break the page for a different month? Please help.
I have also face some similar type of problem and I solve it through the page break. If your data is coming in a list according to the months you simply add a page break after a month record and it will show the next record on the next page.
Please try the below code as it may help you in solving your problem.
I think it was help you more and follow the given link... https://salesforce.stackexchange.com/questions/216525/how-to-save-renderas-pdf-in-files-folder best regards - Latest Sports TV (https://ghd-sports.com/)
You can use the page-break property of the CSS. You can add 'page-break-after: always;' in your code where you want to break the page.
For more information please refer the below link:
https://www.w3schools.com/cssref/pr_print_pageba.asp
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
All Answers
Greetings to you!
I have also face some similar type of problem and I solve it through the page break.
If your data is coming in a list according to the months you simply add a page break after a month record and it will show the next record on the next page.
Please try the below code as it may help you in solving your problem. Change it according to your needs. and you can also put page break after also Like (<p clear="all" style="page-break-after:always" /> ).
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
You can use the page-break property of the CSS. You can add 'page-break-after: always;' in your code where you want to break the page.
For more information please refer the below link:
https://www.w3schools.com/cssref/pr_print_pageba.asp
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi