+ Start a Discussion
Shubhashesh MisraShubhashesh Misra 

how to add border on whole VF page Pdf

<apex:page showHeader="false" sidebar="false" renderAs="pdf" applyBodyTag="false"  standardStylesheets="false">
    <head>
        <style>  
        </style>
    </head>
    <apex:form >
        <body data-new-gr-c-s-loaded="14.991.0" spellcheck="false">
            <p style="text-align: center;"><strong>Test Pdf </strong><br /><strong>INFORMATION </strong></p>
            <div style="{!IF((1==1), 'display:block', 'display:none')}">
                <p>TO:&nbsp; <strong>Moblee, LLC</strong><br /><strong>&nbsp; &nbsp; &nbsp; &nbsp; There is </strong><br /><strong>&nbsp; &nbsp; &nbsp; &nbsp; Mount BSR</strong></p>
            </div>
            
            <div style="{!IF((1==2), 'display:block', 'display:none')}">
                <p>TO:&nbsp; <strong>Task, LLC</strong><br /><strong>&nbsp; &nbsp; &nbsp; &nbsp; PO 538643254</strong><br /><strong>&nbsp; &nbsp; &nbsp; &nbsp; hostel</strong></p>
            </div>
            
            <p>RE:<span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>Patient Name: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>
            <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Date of Birth: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Number: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
            <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I authorize and request the disclosure of all protected information for the purpose of review and evaluation in connection with a legal claim. I expressly request that the designated record custodian or agent of the covered  under entity identified above disclose full and complete protected medical information including the following:</p>
            
            <p>I love the feel of wood curls flying off the lathe as I begin to shape the log in front of me. The sound of scraping changes based on the wetness of the wood, the speed at which the lathe is turning, and the type of cut I am making. The smell and feel of wet wood being turned are unique. The water is sprayed out as I cut through the different layers of wood. A log can turn into anything one's imagination can think of with the right set of hands-on tools. I have those hands and imagination. I use all of my senses and intuition to create a beautiful object. That is why I enjoy turning wood.</p>
            <p>Twenty-five stars were neatly placed on the piece of paper. There was room for five more stars but they would be difficult ones to earn. It had taken years to earn the first twenty-five, and they were considered the "easy" ones.</p>
            <p>______________________________________________________________________________<br />Name</p>
            <p>______________________________________________________________________________<br />Law </p>
            <p>______________________________________________________________________________<br />Street Address<br /></p>
            <p>The alarm went off at exactly 6:00 AM as it had every morning for the past five years. Barbara began her morning and was ready to eat breakfast by 7:00 AM. The day appeared to be as normal as any other, but that was about to change. In fact, it was going to change at exactly 7:23 AM.</p>
            <ul>
                <li>I have a right to revoke .</li>
                <li>The information released in response </li>
                <li>My treatment in payment for my treatment.</li>
            </ul>
            <p>Then came the night of the first falling star. It was seen early in the morning, rushing over Winchester eastward, a line of flame high in the atmosphere. Hundreds must have seen it and taken it for an ordinary falling star. It seemed that it fell to earth about one hundred miles east of him.</p>
            <p>Signature of Patient / Legally Authorized Representative<span style="white-space:pre;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>Date</p>
            <p>Signature<span style="white-space:pre;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;</span>Date</p>
        </body>
    </apex:form>
</apex:page>Here is Pdf
Best Answer chosen by Shubhashesh Misra
Suraj Tripathi 47Suraj Tripathi 47
Hi Shubhasheesh Mishra,

Add border for page in style tag
Here is code:

<style> 
@page {
size:A4 portrait;
border: 2px solid black;    
}
</style> 

Here is a pdf with the border:

Pdf with border

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Suraj Tripathi