<!DOCTYPE html><html><head> <title>GENPDF</title> <script src="jspdf.min.js"></script></head><body> <div id = 'genpdf'></div></body><script>var content = window.AppInventor.getWebViewString().split(" || ")[0];var doc = new jsPDF();eval(content);var returnOutput = doc.output('datauri',window.AppInventor.getWebViewString().split(" || ")[1]);window.AppInventor.setWebViewString(returnOutput);
</script></html>
VIDEO and AIA(after edit) attached
You will probably need to visit the jsPDF pages on github to understand the syntax for adding content:
Copy&Paste: Example of user input from: https://mrrio.github.io/
<!DOCTYPE html><html><head> <title>GENPDFTABLE</title> <script src="jspdf.debug.js"></script> <script src="jspdf-autotable.js"></script>
</head><body> <div id = 'genpdf'></div></body><script>var content = window.AppInventor.getWebViewString().split(" || ")[0];var doc = new jsPDF();eval(content);var returnOutput = doc.output('datauri',window.AppInventor.getWebViewString().split(" || ")[1]);window.AppInventor.setWebViewString(returnOutput);
</script></html>
Tested in Android 9 on companion