When a map is printed with a legend, is it possible to suppress the layers not visible within the map extent from being printed in the legend, even if they are activated in the Layers section?
I vaguely remember encountering the same issue at one point, now that you mention it. What it comes down to is one of these two options:
1. modify the cmv print widget
- capturing the current layers visible at the current extent (somehow)
- modifying the print widget to pass the filtered legend layers property to the print service,
2. publish a custom geoprocessing service
writing a custom backend print service that emulates a regular arcgis print service that would modify the print layout to only include layers that are visible at the current scale.
IMHO, Both of these scenarios is going to take a lot of programming and isn't really something that can be answered in the scope of an answer on stack overflow.
The question becomes, how much work do you want to go through to get this working?