Select to view content in your preferred language

Incomplete legend when print

3029
23
07-13-2020 01:01 PM
ThafnySoares
Occasional Contributor

Hi guys! I have a problem with the captions when I print the map. Some caption items do not appear in the pdf (and others) and I was unable to find a pattern. This caption is generated through a ClassBreakRenderer. I'm forgetting something? 

Caption generated with ClassBreakRenderer

Caption when printing

In the above case, the first banner does not appear when printing.

0 Kudos
23 Replies
TanuHoque
Esri Regular Contributor

print service includes legends only for features that are currently visible in the current map extent.

0 Kudos
ThafnySoares
Occasional Contributor

I know, but as you can see in the images above, the legend is visible, but part of it is not displayed when printing. Any idea?

0 Kudos
ThafnySoares
Occasional Contributor

I just noticed that when printing some classes do not appear. However, they are on the map. So, I believe that it is not a problem of legend, but the export of classbreaks. Any suggestion?

0 Kudos
TanuHoque
Esri Regular Contributor

my apologies I'm afraid I don't understand it entirely
is there anyway you can give some data etc. to repro this on my side?

0 Kudos
Noah-Sager
Esri Regular Contributor

It would also be helpful to know what version of the ArcGIS API for JavaScript you're using, and what is the version of the print service?

0 Kudos
ThafnySoares
Occasional Contributor

Hi. Thanks for responding. The API version is 4.15. The print server version is 10.5.

0 Kudos
ThafnySoares
Occasional Contributor

Hi. Right now, not because it's internal data, but I'll try to create a similar mass of data and post it later.

0 Kudos
ThafnySoares
Occasional Contributor

I took an example from the API itself and adapted it with the code I'm using (classbreakrenderer). I still intend to create one with my data to have a faithful test case, but maybe this will help. Note that when exporting to PDF the caption is not apparent, even if it appears on the screen.

https://codepen.io/thafny/pen/OJMobdj?editors=1000 

0 Kudos
Noah-Sager
Esri Regular Contributor

Unfortunately, the above represents a different issue, and a known print limitation. If the data is sent via image to the print service, then the legend is not generated for the print-out. We have that doc'ed as a known limitation.

Print | ArcGIS API for JavaScript 4.16