Select to view content in your preferred language

ArcPy Mapping SaveToPDF Example - Anyone got it to work?

1030
4
11-30-2011 05:27 AM
grahamcooke
Regular Contributor
Having attempted for a long time to get TomLux's JAVA SOE Print solution to work, I have conceded defeat and am looking for suitable replacments. Found the examples for ArcPy mapping here and have tried to get the SaveToPDF example up and running. It works, in so far as it doesnt error: But I just get a blank pdf?!?! Am I missing a configuration step? Anyone had any luck with this at all?

I am running flex viewer 2.4 and ArcGIS 10 sp3.
Tags (2)
0 Kudos
4 Replies
KenCarrier
Deactivated User
I have got both working. TomLux example seems to be more stable. The documentation on the DavidSpriggs's ExportToPDF example was very limited.

I have found that the ExportToPDF example works sometimes but not all the time and therefore the consistency caused me to lean more toward TomLux example.

If you need help put your email on here and I can try and help you work through some of the issues.

I am hoping and praying at 10.1 they make a reliable Printing service and widget for each of the API's to go along with the GP service.
0 Kudos
HaroldBostic
Frequent Contributor
Does you map template have the layers in it you want to display?  Are the layers turned on?  If they are turned on, they should show up.  I have you ran the gp on the desktop before publishing?
0 Kudos
DavidSpriggs
Deactivated User
Did you guys get this working? It is very reliable once you get it setup correctly. One trick that may be causing you trouble is that the mxd template needs to be zoomed out to the full extent that anyone may ever ask for. I simply leave the templates zoomed out to world extent. Also, remember to leave all group layers on and turn off only the actual feature class layers in the template. This is necessary due to only the list of actual layers being sent to the service in the request, not group layers. The new print service at 10.1 will make this gp service no longer needed in most cases, and is MUCH faster. It will still be needed for large format printing (> 11x17) by using the data from SDE and not the web service (web service images will begin to pixel-ate at larger print sizes).

Hope that helps!
0 Kudos
DerekLaw
Esri Esteemed Contributor
Just to add onto what David posted:

1. The ArcGIS Viewer for Flex's v3.0 print widget will support the new Server 10.1 PrintingTools GP service OOTB. This can be leveraged in the Viewer's application builder.

2. A video on the new Server 10.1 PrintingTools GP service is available on ArcGIS Video.

Hope this helps,
0 Kudos