Skip to Content
Mar 14, 2019 at 02:43 PM

autoTable is not a function error when using jspdf in SAP UI5 version 1.38


Hello All,

I face issue with using jsPDF library in sap ui5. I have written the below code in my controller.

var doc = new jsPDF('p', 'pt');

doc.autoTable(columns, rows);'table.pdf');

As you see here the variable doc is getting the instance of jsPDF but I am not able see autoTable function in that, I could see save function there.

I have downloaded jspdf and autotable libraries and placed in my UI5 project as below:


I have initialized libraries in json as below


But I get 'doc.autoTable is not a function' error when I execute the code.

I am able to implement this functionality in other UI5 applications of higher versions(1.4.*). I am not sure whether version causes the issue or not. Please help on this.

Thanks in advance


json.png (40.2 kB)
lib.png (2.5 kB)
lib.png (7.1 kB)
json.png (5.3 kB)