Skip to main content

Question:-  How can we apply SLDS and custom CSS to a Visualforce page that is rendered as a PDF?

 

Solution:-

 

To use any standard or custom style on the Visualforce page, we need to download the style sheet file and upload it as a static resource. Then we can import the file into the Visualforce page using the <apex:stylesheet > tag.

 

SLDS and custom CSS are uploaded in the static resource.

 

#Salesforce #Salesforce Developer #Communities #VfPage #Visualforce #Pdf Version #VisualForce Page #Pdfview #Short Code

<apex:page renderAs="pdf" docType="html-5.0">

<apex:stylesheet value="{!$Resource.sldsCss}" />

<apex:stylesheet value="{!$Resource.customCSS}" />

</apex:page>

0/9000