Select to view content in your preferred language

Printing parameters

3209
6
10-11-2013 05:56 AM
MiguelAlmeida
Emerging Contributor
Good morning,

We are trying to use the Javascript API of Arcgis to make the print functionality. This function is working very well. Just you know i'm creating the template with the following parameters:

var plate = new PrintTemplate();
     plate.layout = plate.label = ch;
     plate.format = "PDF";
     plate.layoutOptions = {
     "customTextElements": [],
          "legendLayers": [legendLayer]
     };

My only doubt is how to define the paper size desired since we have only one template (.mxd) created in Arcgis Server. Is there any parameter i could use to define this option ?

I have a simple restrict: I can't create more then one template (.mxd) file. 

Thanks for your attention,
José Augusto Alves de Oliveira
0 Kudos
6 Replies
JasonZou
Frequent Contributor
Hi Miguel,

If you want to use ESRI's print solution (PrintDijit or PrintTask), using Templates to determine the page size, layout and orientation might be the only way to go, and I believe might be the easiest way per design perspective. Otherwise, you may end up developing custom solution on your own.

Good luck.
0 Kudos
MiguelAlmeida
Emerging Contributor
Hi Miguel,

If you want to use ESRI's print solution (PrintDijit or PrintTask), using Templates to determine the page size, layout and orientation might be the only way to go, and I believe might be the easiest way per design perspective. Otherwise, you may end up developing custom solution on your own.

Good luck.


Thank you for your answer.

Do you know how i could develop a custom solution for this problem? Should i use another language maybe Web ADF? I don't know if Web ADF is deprecated or not. I was wondering to create new templates, then i made some maths and discovered that i would have to create about 40 templates to resolve this situation because i would have:

- 4 Custom Templates that exists today.
- 5 sizes of paper (which demands 5 templates)
- Landscape and portrait

So it means 4 * 5 * 2, 40 templates.
0 Kudos
JasonZou
Frequent Contributor
Understand. But I believe creating 40 map templates takes much less effort than developing custom print solution. Map templates are very easy to create, maintain, and deploy. They are scalable as well. Even if you develop custom solution, you will still need to figure out how to deal with different page sizes, orientation and custom layout options. I used to develop one template, but to use CSS and JS to control the layout, orientation and paper sizes. But trust me, it is not fun. I'd go for ESRI's solution if that works for you.

If you still like to consider developing custom print solution, you can develop server object extension either using ArcObjects or arcpy.mapping. Here is the link that may be useful: http://resources.arcgis.com/en/help/main/10.1/index.html#//01540000056t000000. Stay away from Web ADF. It's deprecated.
0 Kudos
MiguelAlmeida
Emerging Contributor
Understand. But I believe creating 40 map templates takes much less effort than developing custom print solution. Map templates are very easy to create, maintain, and deploy. They are scalable as well. Even if you develop custom solution, you will still need to figure out how to deal with different page sizes, orientation and custom layout options. I used to develop one template, but to use CSS and JS to control the layout, orientation and paper sizes. But trust me, it is not fun. I'd go for ESRI's solution if that works for you.

If you still like to consider developing custom print solution, you can develop server object extension either using ArcObjects or arcpy.mapping. Here is the link that may be useful: http://resources.arcgis.com/en/help/main/10.1/index.html#//01540000056t000000. Stay away from Web ADF. It's deprecated.


Thank you very much!!
0 Kudos
georgebush
New Contributor
Thanks for sharing information,your information increase my knowledge.
0 Kudos
georgebush
New Contributor
Thanks for sharing information,your information increase my knowledge.






jumeirahbeachhoteldubai.org
0 Kudos