ESRI Print Sample not working on my machine (see link and screenshot)

1681
15
07-14-2013 03:06 PM
IanPeebles
Occasional Contributor III
I am trying to incorporate the following sample in my application:

http://developers.arcgis.com/en/javascript/samples/widget_print_esri_request/

Notice that the print button is present in the ESRI sample.

When I download the sample to my machine, the print button goes away.  Does this sample require the use of a proxy page?  The code has not been modified, just trying to run it on my local machine.  The screenshot below shows the print button missing.

How can I get this sample to work on my local machine?
0 Kudos
15 Replies
IanPeebles
Occasional Contributor III
i'm not sure.  what does the web traffic look like?  do you see any failed/garbled requests to the print service?


I cannot find anything.  I can get to the REST endpoint just fine.  I checked the ArcGIS Server error logs and nothing was returned for the print task.  Also, I opened a Silverlight application that uses this print task and it works just fine.

I am hoping someone out there can duplicate the problem.
0 Kudos
JohnGravois
Frequent Contributor
im talking about the web traffic that is generated by your app.  please consider using Fiddler, Firebug or Chrome developer tools to inspect the requests that are fired when your JavaScript application is launched.
0 Kudos
TracySchloss
Frequent Contributor
It seems like every time I struggle with making a call that doesn't go anywhere, it isn't in the code at all, it's a proxy page issue.  I noticed in your example that you are using machine names as opposed to domain names.  That could be part of your problem.

A lot of the examples include a proxy subfolder relative to your project, but I have had no luck with that myself. Any time I have to use proxy pages, the only way I seem to get my code to work is to move it from my local machine to my test server.  I have a proxy page configuration on it for all maps on that server.   Other people don't seem to need to do this.  I don't know if it has to do with our firewall settings or some other configuration.
0 Kudos
IanPeebles
Occasional Contributor III
Looks like it was a proxy issue. . was able to set up a proxy page and get the print button to appear.  Now the next step is to modify the code to accomodate the print service.
0 Kudos
TracySchloss
Frequent Contributor
Good luck with that.  Once I finally got my proxy set up, the code was pretty straight forward.  I didn't end up using the print digit, it didn't suit my needs.  Instead I created a print task and made my own dialog.  I thought the prompts to the user in the dijit, including the fact you had to click on a button to view the output, was a little cludgy.
0 Kudos
DonWaldo
New Contributor II

Just another note, to those printing through the proxy.  I had an issue where my map title had an &, which was causing issues when going through the proxy.  Maybe a double encoding issue.  Watch for issues with special characters in the GET url when using the print widget through a proxy.  

0 Kudos