Skip to content

Error when trying to generate pdf with fromHtml  #1499

@SnezanaDichevska

Description

@SnezanaDichevska

version of jsPDF
jspdf@1.3.5 installed via npm, with installed typings for angular2

Have you tried using jspdf.debug.js?
no

Steps to reproduce
when this piece of code is called :

import * as jsPDF from "jspdf";
...
downloadPdf() {
 let doc:jsPDF = new jsPDF();
 let source:HTMLElement = window.document.documentElement;
 doc.fromHTML(source, 5,5);
 doc.save('test.pdf');
}

the following error appears in the jspdf.min.js. Only for generating pdf from html when sent as string or HTMLElement, for ordinary text it works fine.
screen shot 2017-11-01 at 11 33 56 am

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions