screenshot to PDF - custom widget, It takes screenshot of only chart type and not taking the rest of the charts

0
Hi, i am trying to take multiple screenshots of different charts  by using the custom widget -”SCREENSHOT TO PDF”. But it takes only the pie chart. I have set the visibility conditions for these charts and based  on the visiblity these charts will get rendered onto the page and while  pressing the print button it should take the screenshot of the chart. But it is taking  as a blank screenshots except the pie chart.  I tried many possible ways by  changing the width and height of the chart appearance and order of the charts and placing the “printscreen” widget inside the correct containers. I have included the images as well. Please help out on this.     column chart:   screenshot taken by Print screen widget:   For other charts: ===========   I am looking forward for your answer. Thanks in advance.
asked
4 answers
0

Same happens to me. I would line to print line charts using Print Screen to PDF (https://github.com/tieniber/PrintScreen), but the space appears blank in the pdf...

answered
0

Just a suggestion:

I have tried the print screen widget, but after a struggle went to create a regular page with printer friendly styling instead. You can then use window.print() to print to create the printscreen.

Could this also be an option in your case?

answered
0

The Mendix widget uses an older version (0.5) of the JavaScript library ‘ HTML2Canvas’, see also the GitHub page. I think two things need to happen:

  1. Upgrade HTML2Canvas library which the widget uses to at least version 1.0
  2. Implement the best solution mentioned in: https://stackoverflow.com/questions/36213275/html2canvas-does-not-render-full-div-only-what-is-visible-on-screen
answered
0

give the area you are going to print a class. in your case, give the layoutGrid containing the charts a class name, for example “printMe”. Then in the PrintScreen widget, set “Calss of area to print” “printMe”.

 

 

answered