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
Shivangni Jain 20Shivangni Jain 20 

Need to generate ppt in Salesforce

Hi Team,
I need help there is one requirement on button click I need to generate ppt that is happening from vf page attribute content type but there are lot of sections and we need to decide which section should go to slide 1 of ppt which section section go to slide 2 and so on
How to do slide break.
VinayVinay (Salesforce Developers) 
Hi Shivangni,

There is a limitation in salesforce to generate ppt documents

https://trailblazer.salesforce.com/ideaView?id=08730000000BrJ0

References:

https://salesforce.stackexchange.com/questions/258513/how-to-generate-pptx-files-with-the-visualforce-page-and-apex-controller
https://salesforce.stackexchange.com/questions/252969/powerpoint-not-rendering-html

Thanks,
SForceBeWithYouSForceBeWithYou

I was able to do this using PptxGenJS library:
https://github.com/gitbrent/PptxGenJS
https://gitbrent.github.io/PptxGenJS

In order to download/save the file, take a similar approach outlined here for CSV's:
https://www.apexhours.com/export-to-csv-xls-using-lightning-web-component/

I had trouble loading the script though.  My issue (not with ChartJS which was working fine, but with PptxGen JS) was resolved by enabling Lightning Web Security (LWS).

https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.security_lwsec_intro

Thank you Dmitry Bakovich 7!!

https://developer.salesforce.com/forums/?id=9062I000000XrWiQAK

Andee Weir 17Andee Weir 17
Hey guys.  Has anyone got a simple working example of using PptxGenJS within LWC that they could share please?