Printing

4350
7
Jump to solution
03-05-2015 07:33 AM
jaykapalczynski
Frequent Contributor

I have a basic print working from the JS API examples...

But I now want to take that to the next level and customize the print template to look the way I want it to.

Not sure where to start.  Anyone have an examples or working examples, thoughts etc.

0 Kudos
1 Solution

Accepted Solutions
ChrisSmith7
Frequent Contributor

You can create custom print templates - have a look at the following:

http://video.esri.com/watch/1058/arcgis-for-server-101-printingtools-service-tutorial

This is an old video for Flex, but there is some info on pushing the custom template to the server, which you can call from the JS API. Also, to follow-up with Chris Sergent's post, you can alter the look/feel of the print widget however you'd like using HTML/CSS, as well as tap into the API events:

https://developers.arcgis.com/javascript/jsapi/print-amd.html

For example, although I cannot give a link to our site, the print feature in our application looks completely custom - we also automatically load the print window after the job completes using the "print-complete" event (so you don't have to click a link to open the job).

Hope this helps...

View solution in original post

0 Kudos
7 Replies
ChrisSergent
Regular Contributor III

Here is a custom example: Print a Map

Click on the hammer and then click on the printer icon and try it out. You can view source to get the code.

ChrisSmith7
Frequent Contributor

You can create custom print templates - have a look at the following:

http://video.esri.com/watch/1058/arcgis-for-server-101-printingtools-service-tutorial

This is an old video for Flex, but there is some info on pushing the custom template to the server, which you can call from the JS API. Also, to follow-up with Chris Sergent's post, you can alter the look/feel of the print widget however you'd like using HTML/CSS, as well as tap into the API events:

https://developers.arcgis.com/javascript/jsapi/print-amd.html

For example, although I cannot give a link to our site, the print feature in our application looks completely custom - we also automatically load the print window after the job completes using the "print-complete" event (so you don't have to click a link to open the job).

Hope this helps...

0 Kudos
jaykapalczynski
Frequent Contributor

Thanks for the info.....

I think the video example is what I am after....I think..

What I am trying to do is redesign the layout.

I want to add a border and define that's the location for the legend

I want to add other things to the map...changing border colors, rounding edged of the data frames etc.

I am not using flex so that's where it starts to get confusing...I assume that if I create the .mxd for the layout and simply publish that as a service I will get my desired results?  I think.

0 Kudos
ChrisSmith7
Frequent Contributor

I wasn't able to find a newer/non-flex video, unfortunately, but the publishing of the template should be the same, I believe. From the JS API, you can interface to the custom print service like you would with the default, except now you may have new elements you can populate from the JS API (say a text field), different positioning of elements, etc.

0 Kudos
jaykapalczynski
Frequent Contributor

I think that works...just went through and published a service, then created a Map in AGO with model builder...looked like it worked....

THANKS FOR EVERYONES HELP

0 Kudos
jaykapalczynski
Frequent Contributor

That is working great....cheers....

Thanks again.

0 Kudos
jaykapalczynski
Frequent Contributor

I do have one question.  I was putting the template together and added some dynamic text (date and time).  These show up in the template in ArcMap but do not print when I print to PDF (from AGO) after publishing this as a service.  The layers show, the legend, north arrow etc.  BUT not the date and time from the dynamic text.

In addition to the Time and Date I want to create an area that will allow the user to type in some description to add to the map.  How do I get this to show up as a parameter when printing function is used in WebApp Builder Template.

0 Kudos