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.

  • [adinserter block='9']
  • 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

Salesforce Marketing Cloud Integration with Google Analytics 360

Redefining the future of Marketing – Salesforce Marketing Cloud Integration with Google Analytics 360

Blog in

Know your customers better and make smarter, insight-based marketing decisions through Salesforce’s massive customer relationship management platform twinned with Google Analytics 360’s market-leading digital analytics solution…

Popular Salesforce Videos