on 2023 Oct 04 2:16 PM
Hello SAP,
We have requirement to get the smartforms colums value in PDF form. Hence we tried to incorporate the JsPdf library in our sample code. attched codes datails in text form below.
models.txt manifest.txtIndex.html code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>proddetails</title>
<script id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-resourceroots='{"prod.proddetails": "./"}'
data-sap-ui-compatVersion="edge"
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted">
</script>
</head>
<body class="sapUiBody">
<!-- Include jsPDF library -->
<script src="JS/jspdf.min.js"></script>
<script src="JS/jspdf.js"></script>
<script src="JS/jspdf.plugin.autotable.js"></script>
<div data-sap-ui-component data-name="prod.proddetails" data-id="container" data-settings='{"id" : "proddetails"}'></div>
</body>
</html>
But we are getting error as shown below:
Please suggest where we are getting wrong and why we are getting autotable plugin issue. We have also tried using autotable files as attached
Thanks and Regards
Ruchi Kesharwani
Hi, if you already use the jsPDFauto table library, try making the call this way.
If you don't use this library, I'll leave the link so you can download it.
https://github.com/simonbengtsson/jsPDF-AutoTable
Always remember to reference your library in the file where you will use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I encountered the same problem as you a while ago, and the solution was to use the JS AutoTable library to make the call and create the jsPDF object and thus have access to the autotable. If this library doesn't work for you, try looking for another with the same logic using a similar call. If you have any questions, please get in touch and I'm at your disposal.
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.