Search code examples
javascriptphantomjsreportopenlayersjsreport

jsreport - Openlayers not loading


I want to have a report (pdf) showing a map with help of Openlayers. Sadly it seems only to work as html and not with chrome-pdf or phanton-pdf.

Here is my code: https://playground.jsreport.net/w/anon/DLrUNzqm

I already added a fake timeout of 5000 before setting window.JSREPORT_READY_TO_START = true;

Anyone got an idea why it is not working?


Solution

  • phantomjs doesn't support the latest javascript so it probably won't work there because of that.

    However properly configured chrome-pdf will work. In your case you just need to enable the printing trigger in the recipe properties.

    enter image description here

    See the working demo here
    https://playground.jsreport.net/w/jan_blaha/PH_1WzLp