0

I have a VF page which shows the logo and header in pdf(dynamic) like this:(by renderAs="pdf")-

enter image description here

but on the next page the "header and logo overlaps" and look like this:-

enter image description here

I am using this part of code on vf page. Can somebody please suggest what can i do to fix this issue.

                    <div class="header"><div style="margin-bottom:10px;font-size:16px;font-weight:Bold;">USE - NOT FOR ANY FCRA PERMISSIBLE PURPOSE<br/>
                       <img id="Img1" src="{!$Resource.__MBCRLogo}" style = "height: 50px;"/><br/><br/>
            </div></div>
            <div class="footer">
              <div style="width:100%; height:2px; background:black;"></div>
              <table style = "width:100%">
                <tr>
                  <td width = "35%" left-margin = "10px" style="font-size:12px;font-weight:Bold;">
                    Background Check # {!record.name}
                  </td>
                  <td width = "50%" align = "center" style="font-size:12px;font-weight:Bold;">
                    Report Reproduction Date: {!sCurrentDate}
                  </td>
                  <td width = "20%" align = "center" style="font-size:12px;font-weight:Bold;">
                    <div>Page : <span class="pagenumber"/> of <span class="pagecount"/></div>
                  </td>
                </tr>
              </table>
              <div style = "height:30px"></div>
            </div> 


                <table style="width:100%;border: 1px solid black;">
                  <tr>
                    <td colspan="5" style="width:743px;text-align:left;vertical-align:middle;border:0px none #FFFFFF;background-color:#cccccc;">
                      <apex:outputText escape="false" value="Background Check Details" style="color:#000000;font-size:12pt;font-weight:Bold;"/>
                    </td>
                  </tr>
                  <tr>
                    <td class="ColLabel"><apex:outputText escape="false" value="Background Check Status" /></td>
                    <td class="ColValue"><apex:outputField value="{!record.Client_Case_Status__c}" /></td>
                    <td class="ColLabel"><apex:outputText escape="false" value="Background Check Completed Date" /></td>
                    <td class="ColValue"><apex:outputField value="{!record.Report_Closed_Date__c}" /></td>
                  </tr>
                  <tr>
                    <td class="ColLabel"><apex:outputText escape="false" value="Full Name" /> </td>
                    <td class="ColValue"><apex:outputField value="{!record.Full_Name__c}" /></td>
                    <td class="ColLabel"><apex:outputText escape="false" value="Background Check Requested" /></td>
                    <td class="ColValue"><apex:outputField value="{!record.Formation_Order_Request_Date__c}" /></td>
                  </tr>
                  <tr>
                    <td class="ColLabel"><apex:outputText escape="false"   value="Background Check Number" /></td>
                    <td class="ColValue"><apex:outputField value="{!record.name}" /></td>
                  </tr>
                </table>
0

Salesforce uses Flying Saucer as its back-end for rendering PDFs. Take a look at this documentation https://flyingsaucerproject.github.io/flyingsaucer/r8/guide/users-guide-R8.html#xil_40

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.