Activity Forums Salesforce® Discussions Why CSS is not working in PDF created by Salesforce Visualforce?

  • Suraj

    Member
    May 30, 2017 at 11:11 am

    Hi Saurabh,

    You can move tour css style in Static Resources and Refer the Static Resource Css in VF Page

    <apex:styleSheet value="{!URLFOR($Resource.Envelope)}" />

    Hope this will help you.

  • PRANAV

    Member
    March 15, 2018 at 9:16 am

    Hi Saurabh,

    With addition to the Suraj's response, you can also check you use the below code snippet

    <apex:page renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">

    Might be the standard style sheet overwrites your custom CSS.

    Hope this helps you more.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos