The
Below are the versions which I am using, it's working perfectly in local but this error I am receiving in the browser console after being deployed.
"@progress/kendo-react-pdf": "4.13.0","react": "^17.0.2",
const handlePrint = () => {
if (container && container.current) {
/* @ts-ignore */
savePDF(container.current, {
paperSize: 'auto',
margin: 40,
fileName: `Report for ${new Date().getFullYear()}`,
})
}
}
Hello, Akash,
Thank you for reaching out to us. In order to help further we will need more information, can you please provide the following:
Regards,
Filip
I am using https://qiankun.umijs.org/. Qiankun framework to embed micro react application. I have shared package.json of this project only.
The problem is the window object which has been used in save-as.js
````var e = document.createEvent('MouseEvents');
e.initMouseEvent('click', true, false, window,
0, 0, 0, 0, 0, false, false, false, false, 0, null);`````
is getting changed to some different object
It seems that Qiankun changes the window when the app is deployed, which is causing this error. This behavior is also mentioned in their repository multiple times:
https://github.com/umijs/qiankun/issues/1502
Two things can be tried which could help:
https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/PDFExportProps/#toc-proxyurl
I hope this helps.
Regards,
Philip