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
Michael MMichael M 

Any ideas for how to keep lightningstylesheets and renderas pdf?

Hello, I am well aware that there is an issue with using SLDS together with renderas=pdf in a VF page. However I basically need to make this work. Does anyone have an idea for a workaround for how to make this work? I am open to any suggestions!
Best Answer chosen by Michael M
AnudeepAnudeep (Salesforce Developers) 

All Answers

AnudeepAnudeep (Salesforce Developers) 
This was selected as the best answer
Michael MMichael M
Hi Anudeep,

Thank you for those resources. the PDFViewer package sounds like it could be a good fit but I could not seem to get it to work. I found something that sounds good- essentially a way to use javascript instead of renderas PDF. The link is here: https://www.eternussolutions.com/2016/08/09/generate-pdf-visualforce-pages-going-beyond-renderas/#comment-363

However it doesn't seem to be working either. Do you think I could send you my code here and based on that website see if I'm doing anything wrong?