I am getting a leading blank page in below PDF. Can someone let me know how to remove that?

Apex page

<apex:page renderAs="pdf" standardStylesheets="false" doctype="html-4.01-strict" controller="cntl_FormTemplatePrinter" sidebar="false" showHeader="false" cache="false" >


        <style TYPE="text/css" media="print,screen">
            body {font-family: Times-Roman; font-size: 12pt;}

<apex:repeat value="{!lstInteger}" var="int"> 

<apex:repeat value="{!formTransactions}" var="sof">
   <div style="page-break-before:avoid;">
    <apex:dynamicComponent id="dcx" componentValue="{!ValidTemplate}" />
        <!--div style="page-break-after:always;">
            <apex:dynamicComponent id="dcx" componentValue="{!ValidTemplate}" />



Try adding this in your CSS : Find the right place where you are creating data of your PDF

position: absolute;
top: 0;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.