Select to view content in your preferred language

Setting the Map or Layer DPI?

1404
3
11-14-2011 10:41 AM
GregoryDillon
Occasional Contributor
I have a PDF export feature that uses the SilverPDF library.   I want to improve the output quality on the pipes displayed in the PDF (which is ultimately printed out).   This is a dynamic layer.   I believe in order to do this we would need to set the DPI on the map or the layer itself rather than the PDF page or document.    Where do I set the DPI on the map or layer (I can't find the property)?    Am I correct in that the fix would be needed on the map's or layer's DPI rather than the PDF (if its the PDF where is this setting)?
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
There is no DPI property for the map or for the layer.

A dynamic layer requests always an image having the size of the map on the screen.

We can try to include your map in a smaller viewbox. In this case, the images will still have the size of the map, but this will have a better definition  in the viewbox.

Though, note that you will quickly run into an ArcGIS server limitation: the size of a dynamic layer image is limited to 2048*2048.
0 Kudos
GregoryDillon
Occasional Contributor
What did you mean by "We can try to include your map in a smaller viewbox"?

I actually don't use the screen map when I print, but rather create a new print version of the map with the same size as the page (the user pick the page size from a dropdown).  I then rebuild the print map by adding print versions of ArcGISDynamicMapServiceLayer (pointing to print version of web services) that are equivalent to the layer currently visible on the screen map.    I was hoping to set the DPI on the print version of the map.

I think this might be what you are suggesting or hints at it.   Or are you suggesting something else?   Sorry I got a little confused by you last response.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Sorry I was unclear (and furthermore I am not sure it's a good idea so... :().

What I meant is that you might create a Viewbox with the same size of the page and include in this viewbox a map having twice (for example) the size of the page. This will change the scale of the map.

Easier to understand with a sample. The left part is the map without viewbox and the right part is the map inside a viewbox.

 
<Grid x:Name="LayoutRoot" >
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <esri:Map x:Name="MyMap"  WrapAround="True" Grid.Column="0" Height="400" Width="400">
        <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
            Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" 
            InitializationFailed="Layer_InitializationFailed" />
        <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer" 
            Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/Map..."
            InitializationFailed="Layer_InitializationFailed" />
    </esri:Map>
    <Viewbox Grid.Column="1" Height="400" Width="400">
        <esri:Map x:Name="MyMap2"  WrapAround="True" Height="800" Width="800">
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
            Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" 
            InitializationFailed="Layer_InitializationFailed" />
            <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer" 
            Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/Map..."
            InitializationFailed="Layer_InitializationFailed" />
        </esri:Map>
    </Viewbox>
</Grid>
0 Kudos