Igor-Vladyka / leaflet.browser.print

A leaflet plugin which allows users to print the map directly from the browser
https://igor-vladyka.github.io/leaflet.browser.print/
MIT License
155 stars 76 forks source link

Fullscreen support #63

Closed adacurro-usgs closed 5 years ago

adacurro-usgs commented 5 years ago

Hello @Igor-Vladyka . I am trying to print my map into PNG format. I'm not sure if it's a bug on domtoimage plugin or on this plugin but I noticed that it does not support printing on fullscreen mode. I'm using this plugin -> https://github.com/Leaflet/Leaflet.fullscreen.

This the result I often get is like this

image

Tried it on Chrome and Firefox (latest version for both browsers) sometimes it's even exporting into .txt file if I include the documentTitle option

Appreciate the help!

adacurro-usgs commented 5 years ago

Here's the proof where it exports it to .txt file

image

Igor-Vladyka commented 5 years ago

Hi,

You don't need fullscreen plugin to export/print map. browser print plugin isolates map + needed content(in this case there will be no additional content), creates fullscreen overlay and then zoom map to fit needed size.

In this case, fullscreen plugin somehow overrides plugin behavior.

So, actually - you just need to specify correct map(paper/image) size to print plugin and it will do everything else.

Please let me know if you have any other questions, and/or problems, I'm ready to help.

Regards, Igor