salesforce-commerce-cloud-libraries icon indicating copy to clipboard operation
salesforce-commerce-cloud-libraries copied to clipboard

Use libraries in controllers

Open kgeorgiou-cognity opened this issue 2 years ago • 2 comments

I would like to use the jsPDF library in a controller, but as far as I understand right now it is only available for frontend js scripts. Is there a way to use the library inside a controller?

kgeorgiou-cognity avatar Jun 20 '23 19:06 kgeorgiou-cognity

This library has been converted to work in controllers. Please have a look at the readme.

taurgis avatar Jun 22 '23 18:06 taurgis

Thank you, I figured it out. Apparently the cartridge was not properly activated. In the jsPDF documentation it is stated that you can create pdf from html. I have tried using the function suggested there, but I get an error that this function does not exist. Is there something i am missing?

kgeorgiou-cognity avatar Jun 23 '23 08:06 kgeorgiou-cognity