Select to view content in your preferred language

ArcGIS server 10.1 : PrintingTool

4614
9
06-22-2012 07:07 PM
DeminHu
Deactivated User
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.
0 Kudos
9 Replies
DeminHu
Deactivated User
I really hope I coul know  if other people have the problem with  this build-in servicce or not, so I could figure out if it is my configuration problem or not.

Actually today,I got  the chance  to test again,  it partially worked for me:

1.If graphic was a point and  the symbol was simple maker symbol,  no controltemplate inside, no visualstates,  not  binding to  any text, it worked, otherwise, it failed.
2.If the  graphic was a polyline with simple polyline, it worked.
3. if the graphic was ploygon with  FillSymbol, if failed.

Thanks  for any help.
0 Kudos
by Anonymous User
Not applicable
Original User: sergeyru

I have a similar problem.
The difference is that all types of graphics do not work and the error is "Error performing execute operation".
Log of server shows:
1. Utilities/PrintingTools.GPServer failed to process request.
2. Internal Server Error.

Any suggestions ???
0 Kudos
PreetiMaske
Esri Regular Contributor
Custom Symbols and Rendererer are not supported by Rest API at 10.1. Hence the API downgrades any custom symbols/Renderers to the base type with black color. Note, In a graphicslayer if a custom symbol is found even for one graphic, all symbols are downgraded for that layer.

For e.g the symbol below would be printed as black point

<esri:SimpleRenderer x:Key="YellowMarkerRenderer">
                <esri:SimpleRenderer.Symbol>
                    <esri:SimpleMarkerSymbol Size="20">
                        <esri:SimpleMarkerSymbol.Color>
                            <RadialGradientBrush>
                                <GradientStop Color="Yellow" Offset="0.578"/>
                                <GradientStop Color="#FF0E0D07" Offset="1"/>
                            </RadialGradientBrush>
                        </esri:SimpleMarkerSymbol.Color>
                    </esri:SimpleMarkerSymbol>
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
0 Kudos
by Anonymous User
Not applicable
Original User: doopsterus

I was just at the ESRI UC at the end of July and was told if we created our own symbols with visual states, and then implemented the IJsonSerializable interface that the printing would print our custom symbol.  I have not tried this yet but I just thought I would share.  If anyone has done this please post an example.
0 Kudos
ChrisBradberry
Deactivated User
I also found that you can only print layers from one domain.
0 Kudos
by Anonymous User
Not applicable
Original User: ballPointPenguin

I have a similar problem, using ArcGIS Server 10.1 for Windows and the javascript API 2.8:

If asynchronous is NOT selected in the print service, everything works as expected, however when I select asynchronous, I get the
Error performing execute operation


I hadn't thought that this has anything to do with layers or geometry, since it works in synchronous mode.

My problem is also described here:
http://stackoverflow.com/questions/12431283/esri-javascript-asynchronous-print

Thanks,

Ben
0 Kudos
ChrisBradberry
Deactivated User
I got help from esri and they determined it was my proxy settings that were not allowing the print tool to connect outside the firewall.  I used this help, which fixed the problem.

http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000309000000
0 Kudos
by Anonymous User
Not applicable
Original User: twang@esricanada.com

Hi,

I have found the printing service only supports a GraphicsLayer with a single type graphic (point, polyline or polygon). For instant, it would not work if your graphicslayer has a mappoint and a polyline.

It dose not support transparency. Also it dose not support a point with ESRI.ArcGIS.Client.Symbols.ESRI.ArcGIS.Client.Symbols.TextSymbol.

I can have three graphicslayers with point type, polyline type or polygon type. But I don't know how to work around with transparency and TextSymbol. Please advise.


Thanks,


Tom
0 Kudos
ChrisScoff
New Contributor
First thing i want to recommend is to try your ArcGIS 10.1 Tools > Options dialog Connections tab and having a look at the proxy server settings. ArcGIS 10.1 by it self detect the server settings from your machine but you might need to enter a username and password if there is a proxy server at your site that requires authentication.

Secondly my best guess is to upload simultaneous ESRI layer files and images without appreciating the difference between a .lyr file and a .lyr package. This seems like a HUGE problem that should be prominently explained on the site. I'm not really sure why layer files are allowed to be uploaded at all if they're just going to break.
0 Kudos