Print or download content that's displayed inside a Rich Content Viewer element

I have a dropdown on a dynamic page where users can select song charts that display inside a Rich Content Viewer (data from website CMS). How would one give users the option to download (or print) the content displayed inside a Rich Content Viewer element? Here is a screen shot of what I’m looking to accomplish:

Product:
Wix Editor

What are you trying to achieve:
I’m looking to give end users the ability to click a button and have content from a rich content viewer download as a .pdf

Additional information:
The data in the Rich Content viewer is coming from my website CMS (HTML code)

Try using the PDF Generator app by @thewixwiz:

1 Like

Hi, dawilsonw !!

There is an npm package called jsPDF, which, if I remember correctly, can convert HTML to PDF. To implement this on Wix, you would either need to load jsPDF via CDN within an iframe and implement the code there, or import the npm package within a custom element and implement the code that way. However, I’ve never tried creating a PDF from HTML containing rich content, so I’m not sure if it would work as expected. There are also other npm packages like html2canvas and html2pdf. There are likely many options for converting HTML to PDF, along with numerous articles and code references to consult. If you keep researching, you’ll surely find a solution. Good luck! :wink: :+1: