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
Parish Haldkar 11Parish Haldkar 11 

Visualforce page adds blank page at the end when renderas PDF

 Hi everyone!
I'm trying to create a visualforce page PDF with pages in portrait and landscape.
 I have also used the page-break-before:always and page-break-after:avoid, 
but when I preview the PDF there is a blank page being added at the end of the PDF.

It is a lengthy code so unable to attach the code here.
AbhinavAbhinav (Salesforce Developers) 
Hi Parish,

Have you check discussion on below link for similar scenarios ?

https://salesforce.stackexchange.com/questions/95439/stop-blank-page-being-created-because-of-page-break-setting-at-end-of-visualfo

https://salesforce.stackexchange.com/questions/110229/remove-leading-blank-page-in-apex-pdf-page

If it helps, mark it as best answer. 

Thanks!
Parish Haldkar 11Parish Haldkar 11
Hi Abhinav,

Thanks for the reply.
I have tried the solution mentioned in the above links you mention. But none of them seems to work for me.