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
priya123priya123 

Hi

How to remove the extra blank page(last) while creating a PDF using renderAs attr in Visualforce?Please reply...

rohitsfdcrohitsfdc

hi,

this may be occuring due to <div style="page-break-after:always;">  if you are using that in your code.

if that is the case, try using the following code. else please share your code.

 

<apex:page Controller="A" renderAs="pdf">
  <apex:repeat value="{!count}" var="v">
    <div style="page-break-inside:avoid;height:200px;width:300px;border:solid red 1px;">
      <!-- your content here -->
    </div>
  </apex:repeat>
</apex:page>