Select to view content in your preferred language

How to choose Print Size

952
3
10-04-2013 12:50 PM
MiguelAlmeida
Emerging Contributor
Hello guys,

I'm new in arcgis community and i'm trying to build a map application using arcgis js 10.0. My problem now is how to choose the paper size at printing, example: A4, A3, A2.

I have a dropdown in my website, so the user can choose the desired paper size and a button to print the map. I'm trying to make it using only one Template (.mxd). I saw some examples where it's needed to have a template for each paper size.

Is there anyway to choose the paper size of a template by javascript ? So i would not need more then one template file.

I was taking a look in ArcMap and i found an option to scale the printing proportionally by the paper size, i hope it means that there is a good way to reach it by the javascript API. 

(ArcMap > Page Print Setup > Scale Map Elements proportionally to changes in Page Size)

I appreciate any help. Thank you for your time!
0 Kudos
3 Replies
MiguelAlmeida
Emerging Contributor
Do i have to give you more information about this problem?
0 Kudos
ManoelloFeijo
New Contributor
Hello,

You can do a conditional algorithms with javascript, but I think is better you make one page for each size of paper because you can set the margins and limits for each size of paper if you just will work with 3 sizes.
0 Kudos
MiguelAlmeida
Emerging Contributor
Well its no only three types of paper, it was only an example. I have some parameters, i will show you the real cenario:

Parameters
- Landscape / Portrait
- 10 types of mapserver
- Five types of paper

In my application the user can choose one of 10 types of map server to view his map, but for each type of map server there is a different template for printing and they are almost totally different. Besides that you must multiply the number of templates for two because there is one for Landscape and one for portrait.

Now the user can choose which paper the template must be printed and there are five types, so if i keep creating a new template for each new type of paper i will have 100 templates totally, sounds like crazy. That's why i'm trying to find out some way to choose the type of paper without creating more templates.

Do you know how i can do it in javascript?
0 Kudos