tieniber / PrintScreen

A Mendix widget to grab an element (or the whole screen) and write it to a PDF
Apache License 2.0
0 stars 9 forks source link

The widget does not work in pages that have a URL assigned. #6

Open Abhijit-Bhattacharya-Epiuse opened 3 years ago

Abhijit-Bhattacharya-Epiuse commented 3 years ago

The widget does not work in pages that have any specific URL assigned. It works on pages that dont have a explicit url and href is index.html.

The below logs shows that the widget script perhaps gets confused due to the page url:

html2canvas.js?637516127091575553:620 GET http://localhost:8080/p/mypage/styles/web/css/main.css?637516127091575553 net::ERR_ABORTED 404 (Not Found) (anonymous) @ html2canvas.js?637516127091575553:620 k @ jspdf.js?637516127091575553:11913 j @ jspdf.js?637516127091575553:11913 module.exports @ html2canvas.js?637516127091575553:592 renderDocument @ html2canvas.js?637516127091575553:972 html2canvas @ html2canvas.js?637516127091575553:945 createPrintscreen @ PrintScreen.js?637516127091575553:75 (anonymous) @ mxui.js?637516127091575553:5

So the widget script should instead be trying to look for: http://localhost:8080/styles/web/css/main.css?123....