Sara Hernandez
Sara Hernandez

Reputation: 33

Issue printing leaflet map and imagery layer using wkhtmltopdf

currently we are working on a web tool using Ruby on Rails and one of their functions is generate a PDF report based in HTML template, that template has a map built with leaflet-0.7.3 and we are using a gem called pdfkit v0.8.2, wkhtmltopdf-binary v0.9.9.3 to generate PDFs, but right now we are facing an issue with that report, when It generates that report it is splitting the map and layers like this:

PDF error

It is supposed to look like this

Expected result

Any suggestions what's going on? or what should we do?

Any help would be great for us! thank you guys

Upvotes: 2

Views: 715

Answers (1)

Wilson Castiblanco
Wilson Castiblanco

Reputation: 345

I was facing a similar issue with my HTML template when It was generated, so, I solved it replacing my leaflet stylesheet with the last version, which is

http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css

please, replace your current stylesheet and share me what was your result.

Upvotes: 1

Related Questions