Select to view content in your preferred language

Printing

1000
6
03-24-2014 05:53 AM
jaykapalczynski
Frequent Contributor
Hello
I am tryring to incorporate a Print funtion into my app from this example
https://developers.arcgis.com/javascript/jssamples/widget_print_esri_request.html

If I use the example everything works alright....note that I reference my own proxy and printURL
I can print

The problem arises when I try and add my own feature services.
The map and print button appear as expected and the login screen appears as my services are secured.

If I add the below
The secured login screen appears.  I am able to enter my credentials and the Feature Service appears.
BUT when I hit the print button is just spins and spins...nothing happens

I changed the service name....It seems to be coming from the Service.
Can you print Secured services?
Does it have to be a Map Service?

Thanks

   var TestUrl = "https://web1.gov/arcgis/rest/services/Map/Map_Readonly/FeatureServer/0";
    var FeatureLayer = new FeatureLayer(TestUrl, {
      mode: FeatureLayer.MODE_SNAPSHOT
    });
    app.map.addLayer(FeatureLayer);
0 Kudos
6 Replies
BenFousek
Regular Contributor
Jay,

You need to add your credentials to the print tool before publishing the print task.

There's a help page for it but I can't seem to find it. Here's how:
1) copy Export Web Map tool to a new toolbox
2) right click and now Edit is enabled and select it
3) fill in credentials
4) publish as usual

You do need catalog to be connected to the server(s), which I assume you do.
0 Kudos
jaykapalczynski
Frequent Contributor
thank you....this has been driving me crazy...
can you look for the documentation and post here is anyone else is having the same issues.
very appreciated.
0 Kudos
AlexeiB
Occasional Contributor

Hi Ben,

I am trying to do the secured print and have done exactly as they have indicated on the link you have provided.

My scenario is pretty straight forward. I create a map accessing secured serviced via a proxy. When I want to print I am using the esri/dijit/Print widget to which I assign my map and the URL of my secured print service which I have published.

After I call it, nothing happens and no map is printed. My only success with printing secured services was by creating a new map into which I load the main map's layers but I needed to append a short lived token to them.

Thank you.

0 Kudos
jaykapalczynski
Frequent Contributor
THANK YOU!!....

Edit:  Something not working still.....will get to ya
0 Kudos
AlexeiB
Occasional Contributor

HI Jay,

Were you able to get this to work?

Thanks.

0 Kudos