jsPDF Integration

Hey guys, thought I wrote up here on this yesterday but obviously forgot to post.

What about creating a plain bubble view that are formatted as a PDF page. Then using a JS plugin to convert the html to PDF.

The page would be for example “Reportmaker”. And you could have different groups in it hidden or visible based upon what type of report you are generating. Possibly you should have another page called PDFgenerator which uses html2canvas and jspdf. First it creates a canvas of the passed URL, then it uses jsPDF to save that and store to bubble.

See: http://stackoverflow.com/questions/26481645/how-to-use-html2canvas-and-jspdf-to-export-to-pdf-in-a-proper-and-simple-way

Alternatively you could place all HTML inside a bubble group and then use an inner html element with javascript to apply an ID to the div, then use the html2canvas on that DIV id and pass it to jsPDF.
You could then have a floating group on top to control the generation etc.

See: https://www.youtube.com/watch?v=WJOfCnoqShw

Anyone wanna contribute to this?

1 Like