Hello,
Your sample in the documentation doesn’t work :
https://docs.dhtmlx.com/scheduler/pdf.html
When I changed from v5 to v6, exporttopdf stopped to work:
scheduler.exportToPDF is not implemented.
This feature requires an additional module, be sure to check the related doc here
Any help please ?
Hello,
Your sample in the documentation doesn’t work :
Thank you for your attention. We’ll fix it.
Please look at this working example:
https://snippet.dhtmlx.com/rcsg68hk?text=scheduler.%2Bexport&mode=wide
This feature requires an additional module, be sure to check the related doc here
To enable this feature, you only need to include the https://export.dhtmlx.com/scheduler/api.js file on the page:
<script src="https://export.dhtmlx.com/scheduler/api.js"></script>
And then call exportToPDF()
method.
Thank you for your answer.
I modified your example to use multiple scheduler on page and it’s working (I tried because it’s my case)
I don’t know what I’m doing wrong… what I changed in my code is using v6 (instead of v5) and using multiple schedulers on page.
I use React, any idea how/when I should load the api.js ? My guess is that it’s loading too soon or too late… because when i check in debugger (F12), the file is loaded
For anyone struggling with this, here is how I finally made it working in a SPFX webpart:
const script = document.createElement(“script”);
script.src = “https://export.dhtmlx.com/scheduler/api.js”;
document.head.appendChild(script);
script.onload = () => {
ReactDom.render(element, this.domElement);
};
1 Like