Jump to content
JasperReports Library 7.0 is now available ×

Custom Visualization Component using Leaflet won't render on PDF export


dany.isenguerre

Recommended Posts

Hello,

In Jasper Studio 8 and JRS 7.9.2

I wrote a CVC to display a marker on a Leaflet map

The marker is a SVG shape but the map is a Leaflet one (png ?)

On Studio

- the CVC renders perfectly in HTML mode but only the SVG marker is exported to PDF an gets the size of the page

- only the SVG marker is rendered in Java mode

 

On JRS: the CVC is perfectly rendered but only the SVG marker is exported to PDF with the size of the page

How to export Leaflet background map in the PDF ?

Regards

Dany

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi Dany, 

there is a known problem with export to PDF for HighCharts that is related to an update of Google Chrome. The effect you describe is the same. HTML works fine, but PDF is empty. Maybe the solution will help you as well. 

There are  2 settings you can add to your Studio Properties. 

net.sf.jasperreports.chrome.page.isolate=true

net.sf.jasperreports.chrome.argument.remote-allow-origins=*

bildschirmfoto_2023-04-11_um_11_49_59.thumb.png.312d1bcbcb2e4bf39dfeaa8b726393d0.png

Re-start Studio and try to create a PDF.

Please let me know it that will work for you, or if you still do not see the Map in the PDF. 

Regards TT

 

Link to comment
Share on other sites

Hello,

Thanks for this proposal, but this is not the solution

The problem is the same on our professional JRS.

I think there is a problem with the "asynchronous"call of Leaflet map tile images.

The only rendered element in Java mode and PDF export is the SVG marker I create dynamically in my CVC and put on the Map

I will try with a simple image to see what happens

Regards

Dany

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...