Closed euangordon closed 5 years ago
Please use other plugin to export it as PNG, this plugin can only call browser print action for now.
Please use other plugin to export it as PNG, this plugin can only call browser print action for now.
Thanks @Igor-Vladyka, I have used easyPrint.js to get a PNG of the map in the browser for the moment.
One thing I quite like about Browser Print is that I can print a different base map from the one being viewed by the user. At the moment we normally display a simple basemap, but on print we are printing a high quality Sea Map from Transas.
My ideal solution is going to be for the user to select that he wants to print a "Route Report" from the browser, this will send his route (waypoints on the map) to the API controller. The controller will render the map in a headless brower, plot the waypoints on the map and zoom the map so that all waypoints are in view. Create a png of this image and then sent it to jsReports to be included in a PDF report which will be viewed / downloaded by the user.
Current plugin prepares map to print and uses in-browser action for actual printing. You can override actual browser behavior. Here is more details: download-map-as-image And full example with added custom action to export image in AUTO mode.
Regards, Igor
Is there any way to export to png instead of printing? Would be a nice feature to add to a Print / Export menu.