PrintTask force scale

649
5
Jump to solution
10-11-2012 10:27 PM
MatejSkerjanc
Occasional Contributor
In the video (http://video.esri.com/watch/1058/arcgis-for-server-101-printingtools-service-tutorial) we're presented with option of forcing custom scale. Which setting is that? I cannot find it in either exportOptions nor template of PrintTask.

Any information will be appreciated!
Thank you,

Matej
0 Kudos
1 Solution

Accepted Solutions
AdrianMarsden
Occasional Contributor III
Yep - it was the only easy way I could see, without messing around with Python scripts.  Plus I can sell it as a "feature" as users did initially want a pull down list of scales on my ArcIMS app, which I told them was too hard and not relevant.  Plus it gives them a better idea of what they get..  Here's my code;

Zoom list - somewhere on a button bar

            <select name="zoomselect" autocomplete="false" id="zoomselect" dojotype="dijit.form.ComboBox" style="width: 100px;" onchange="zoomscale(this.value)">                  <option>250000</option>                 <option>100000</option>                 <option>50000</option>                 <option>25000</option>                 <option>10000</option>                 <option>5000</option>                 <option>2500</option>                 <option>1250</option>             </select>


The function it calls

function zoomscale(scale) {     map.setExtent(esri.geometry.getExtentForScale(map, scale)); }  


Then print how you currently are doing.

View solution in original post

0 Kudos
5 Replies
MatejSkerjanc
Occasional Contributor
I was answered that this isnt possible.

I have issue withtrying to print on various formats (A1-A4 landscape or portrait) in certain scale. I'd mostly need 1:1000 scale. But whenever i set scale to 1:1000 the output print is in 1:1xxx scale meaning its a bit off. Is there a way to make print output in1:1000 ?
0 Kudos
AdrianMarsden
Occasional Contributor III
This is what I've been doing this week on my Alpha ArcIMS replacement app.

  • On the map I have a dojo combo with pre-defined scales, but also allows typed in values

  • This sets the screen map to the required scale

  • A print button that opens a dojo dialog to allow title and comments (I'm using author for comments) and a filteringSelect to select template.

  • A print option that leaves the default enforce map scale

  • This generates PDF at the scale selected

One thing to be careful of, which I have in my current ArcIMS project, which generates PDFs is that users don't have any of the Acrobat scaling settings switched on.

I was also having difficulties setting the DPI, but I think I have sorted that on a esri sample last night - I just need to integrate it with my main code.

ACM
0 Kudos
MatejSkerjanc
Occasional Contributor
So you actually resize the original map if i understand correctly?
0 Kudos
AdrianMarsden
Occasional Contributor III
Yep - it was the only easy way I could see, without messing around with Python scripts.  Plus I can sell it as a "feature" as users did initially want a pull down list of scales on my ArcIMS app, which I told them was too hard and not relevant.  Plus it gives them a better idea of what they get..  Here's my code;

Zoom list - somewhere on a button bar

            <select name="zoomselect" autocomplete="false" id="zoomselect" dojotype="dijit.form.ComboBox" style="width: 100px;" onchange="zoomscale(this.value)">                  <option>250000</option>                 <option>100000</option>                 <option>50000</option>                 <option>25000</option>                 <option>10000</option>                 <option>5000</option>                 <option>2500</option>                 <option>1250</option>             </select>


The function it calls

function zoomscale(scale) {     map.setExtent(esri.geometry.getExtentForScale(map, scale)); }  


Then print how you currently are doing.
0 Kudos
MatejSkerjanc
Occasional Contributor
We thought of same thing. I found it a bit awkward though heh. Marked this as answered as this is the only answer/solution i've found (including esri support). Thank you.


Matej
0 Kudos