How to output as PDF?

There are some pure JavaScript libraries such as jsPDF (jsPDF - HTML5 PDF Generator | Parallax).
How can I output a page generated in WeWeb as a PDF?
Is it possible to do this with a pure JavaScript library or do I have to use a third party web site/service such as https://www.api2pdf.com/ ?
I suppose I could take jsPDF and put it on AWS or something like that and enable some restful inputs.

I may have reports with 10-30 pages.
What is the recommended procedure to get WeWeb to output a PDF.

2 Likes

This is at least a start.

I added
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.js"></script>
to the custom code shown below


Then I added this as custom JS

var makepdf = document.getElementById("makepdf"); //id of section to be exported
html2pdf().from(makepdf).save();

I haven’t try multiple pages, custom file names or anything like that yet.

Find documentation for the JS library here