This afternoon, I just got ArcGIS 10.1 set up on my test machine, I was really excited and could not wait one more minute to test PrintTool ( build-in geopreocessing service ).
I was really bothered by asking to save map as images and pdfs, I tried to built my own tools to save the map as PNG image, but I had problem with bing layers.
From the service description, I hoped it could finally solve my problem.
The PrintingTools service is used by web application developers to export the contents of a webmap to pdf, jpeg, png or other formats. This service is generally used in the context of providing applications with printing functionality
I built a test application:
First, I added bing layers,it worked like a dream, step by step, I added ESRI online layers, feature layers, map services from different domains, it worked as expected.
Then, I started to test graphicsLayers, ( user drawn graphics, query results), probably it doesn't work for graphicsLayer. I tried to deploy the test app under the same web server (from my previous experience with writeblebitmap), it still didn't solve the problem.
1. The first time click Export Map button, it works with the graphics on the map, but no matther what color of the graphic is, the image will show black color of the graphic. Please see the attachment Capture1
2, the second time click Export Map Button, the error will show up instead of image URL, ( object reference not set a value yet). Please see the attachment Capture2.
Because I just set up ArcGIS server 10.1 today,I am not sure I am quite familar with the configuration yet, and I couldn't find any info about if this build-in service works with GraphicsLayer or not. I looked the ESRI prining sample, I tested the sample on my local with ESRI online sample Printing GpServer,it only worked for me if all layers were ESRI online layers, not layers from differnt domains.
Any help, ideas, experiences are appreciated.