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
sfdc development hintssfdc development hints 

break statements in pdf

sfdc development hints
Posts: 15
 

How to give break statements in a pdf file, for eg

 

antonymichaelcook, i want these names to be displayed as

 

 

antonymichael

cook

 

i tried using nbsp , but still isint working, can anyone please help me out with this...

 

 

below one is my code,

 

i am using thid code
<style type="text/css">
@page {
    margin : 70pt .5in .5in .5in;
    @top-center {
        content :element(header);
        font-size : 10 px;
        color : #808080;
        width : 50 px;
     }
     div.header {
    position : running(header) ;
             }


    @bottom-right
         {
            content: "Page: " counter(page) " of " counter(pages);

            color : #808080;
         }

    @bottom-left {
        content :"Equity Marketing";



        font-size : 10 px;
        color : #808080;
    }

}
</style>
</head>




Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

I hope you want to give the break in text of footer or header, right? So here is the code :

 

<apex:page renderAs="PDF">
<head>

<style>

@page {
    margin : 70pt .5in .5in .5in;
    @top-center {
        content : element(header);
     }

    @bottom-left {
        content : element(footer);
    }
    
}

div.header {
    position : running(header) ;
}

div.footer {
    position : running(footer) ;
}

</style>

</head>

<div class="header">
    <apex:image value="https://forceguru-developer-edition--c.ap1.content.force.com/servlet/servlet.ImageServer?id=01590000000El61&oid=00D900000000spb&lastMod=1308239514000" />
</div>

<div class="footer">
    antonymichael <br/> cook
</div>

<apex:pageBlock >
    Test Page 1
    <div style="page-break-after:always"/>
    Test Page 2
    <div style="page-break-after:always"/>
    Test Page 3
</apex:pageBlock>

</apex:page>

 Check out footer, is now coming with break.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page