I want to import jspdf to my business application studio project without using the index.html since i read that index.html doesnt get called when opening apps from fiori launchpad.
I can get the jspdf part working, but once i call the autotable method it throws an error: "Uncaught TypeError: doc.autoTable is not a function"
The path with the jspdf libs:
manifest.json:
"resources": {
"css": [
{
"uri": "css/style.css"
}
],
"libs": [
{
"uri": "libs/jspdf.js"
},
{
"uri": "libs/jspdf.min.js"
},
{
"uri": "libs/jspdf.plugin.autotable.js"
},
{
"uri": "libs/jspdf.umd.min.js"
}
]
}
included in my controller like this:
sap.ui.define([
"sap/ui/core/mvc/Controller",
"../model/formatter",
"sap/ui/core/Fragment",
"../libs/jspdf",
"../libs/jspdf.plugin.autotable",
"../libs/jspdf_debug"
],
/**
* @param {typeof sap.ui.core.mvc.Controller} Controller
*/
function (Controller, formatter, Fragment, syncStyleClass,jspdf, jspdf_autotable, jspdf_debug) {
"use strict";
//jQuery.sap.require("libs/jspdf_debug");
//jQuery.sap.require("libs/jspdf.plugin.autotable");
If i put the jquerys back in the app crashes on startup with this error:
"ModuleError: failed to load 'libs/jspdf_debug.js' from resources/libs/jspdf_debug.js"
Hope someone can help me and looking forward to your suggestions!