+ 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>