0

I'm using the following example to create a pdf that may have more than 1 page. The content being generated for the PDF is dynamic so no way of telling how long content will be. Currently code below only creates 1 page pdf and cuts off remaining content. Please advise.

var doc = new jsPDF();
var specialElementHandlers = {
    '#editor': function (element, renderer) {
        return true;
    }
};

$('.download_pdf').click(function () {
    doc.fromHTML($('.report-section-print').html(), 15, 15, {
        'width': 170,
            'elementHandlers': specialElementHandlers
    });
    doc.save('report.pdf');
     location.reload();
});
frshjb373
  • 627
  • 9
  • 27
  • Possible duplicate: http://stackoverflow.com/questions/19272933/jspdf-multi-page-pdf-with-html-renderrer – AllInOne Nov 14 '16 at 19:35
  • Better use one of the excellent pdf addons for EE https://devot-ee.com/search/results?keywords=pdf&addon_version_support= – Jelle Dijkstra Nov 16 '16 at 21:35
  • @JelleDijkstra, ya i was able to get PDF Press configured with cookie_favourites and it worked. Now need to find a solution for user to email that pdf. – frshjb373 Nov 16 '16 at 22:58
  • Well, pdf press let's you save the pdf on the server, so you can refer to it in a hidden file field and let Solspace freeform send it either as an attachment, or as a downloadable link. For more indepth answers on EE stuff post your questions over here: expressionengine.stackexchange.com – Jelle Dijkstra Nov 17 '16 at 08:01

0 Answers0