Select to view content in your preferred language

Advanced print solution

53297
296
02-19-2011 10:52 AM
TomSchuller
Frequent Contributor
Please find in the codegallery my first version of an advanced print solution:
http://www.arcgis.com/home/item.html?id=6809086326ea4c76bf026a32bb9dd698

The backend is developed in Java as a ServerObjectExtension: PChPrintSOE

The communication to the SOE is realized by the REST.
So, any client can be used Flex, Javascript, ...
I just created a simple FlexWidget.

Some features:
- full print over the rest api (usable by any client)
- export to pdf,jpeg,png,emf and mxd!
- view paper layout extent live on map
- make print on a "template" mapservice by keeping the predefined layout
- multi-mapservices/multi-server support
- add graphics on the map view positioned in map units
- add elements on the layout view positioned in paper units like scalebar, scaletext


The code is under full development:
- support for wms layer
- code clean up and reorganization

Any suggestions, remarques or help is welcome.

Live demo with public Esri mapservices (last print button):
http://gis.pch.etat.lu/flexViewerPrint/
   - use this print widget with your PChPrintSOE-enabled mapservices for high quality
   - draw first some graphics with the DrawWidget prior making your print (in mxd format)
Tags (2)
0 Kudos
296 Replies
ScottKiley
Frequent Contributor
Hy,
could you please provide the Arcgis server logs in "verbose mode".
See here:
http://bitbucket.schuller.lu/pchprintsoe/wiki/ErrorReporting

You can also mail them to "tom@schuller.lu"

Tom


Tom,

Sorry for the delay in responding about my Simultaneous map creation error with the Advanced Map widget.
My Verbose Log files when the error occurs is in the attached ZIP file.
There is also a copy with "Clean" in the title, where all references to Map Services that weren't involved in this error were removed.
Let me know if some other information can help diagnose my problem.

Thanks for all your help,

Scott
0 Kudos
DominiqueBerger
Emerging Contributor
Hi Tom

I am having an issue with using the latest SOE/Widget with Flex 3. It installs fine and I can see it has upgraded the SOE as I have the added capbability option (10.1) however when I go to use the widget in a Flex 3 application it opens up as expected however there is no Red Extent indicator as there was previously - also if you hit print nothing happens.

I have reverted back to the previous SOE and widget, which works for V2.5 applications, but not 3.0 applications. Would you be able to help me trouble shoot? I have tested this on both my Dev and Test boxes with the same result.

I have attatched my verbose logs and the debug message from the widget. Your assistance is greatly appreciated.

Thanks very much

Kind regards,
Dominique
0 Kudos
DavidAlford1
Occasional Contributor
I have created a custom Layout, configured it using the ExportWebMap, and made it a service on my ArcGIS server 10.1.  Problem is, I am trying to find a way to make the Title of my map change (dynamic) by allowing the user to put their own title.

I have posted this before and have not got ANY response by ESRI...

HELLO...Where are you ESRI? Your tutorial doesn't cover this!!
0 Kudos
MichaelVolz
Esteemed Contributor
When you are using the demo, where does a pdf that you create get saved to?  Does the enduser have any control over this with the demo version?
0 Kudos
TomSchuller
Frequent Contributor
davida323,
seems that you posted to the wrong forum post. This post is talking of an open-source PrintSOE.
This is not provided nor supported by Esri.

mvolz47,
the generated pdf is stored in the "arcgisoutput" folder of the arcgis server.
In the FlexViewer demo, the pdf is downloaded when it's not blocked by a popup-blocker.

Tom
0 Kudos
PawanVuppala
Frequent Contributor
Hello Dominique/Tom

I am experiencing the same issue on my 3.0 viewer when I add this printpch widget.  I am able to register the java binary but there is no print area being displayed and nothing on the print click.  Please advise..

Thanks!!!

-pAWAN

Hi Tom

I am having an issue with using the latest SOE/Widget with Flex 3. It installs fine and I can see it has upgraded the SOE as I have the added capbability option (10.1) however when I go to use the widget in a Flex 3 application it opens up as expected however there is no Red Extent indicator as there was previously - also if you hit print nothing happens.

I have reverted back to the previous SOE and widget, which works for V2.5 applications, but not 3.0 applications. Would you be able to help me trouble shoot? I have tested this on both my Dev and Test boxes with the same result.

I have attatched my verbose logs and the debug message from the widget. Your assistance is greatly appreciated.

Thanks very much

Kind regards,
Dominique
0 Kudos
PawanVuppala
Frequent Contributor
Is it me or the demo site having a problem printing?  Attachng the screenshot.


Hello Dominique/Tom

I am experiencing the same issue on my 3.0 viewer when I add this printpch widget.  I am able to register the java binary but there is no print area being displayed and nothing on the print click.  Please advise..

Thanks!!!

-pAWAN
0 Kudos
ScottKiley
Frequent Contributor
I was having trouble with using the Print SOE with the FlexViewer when accessed by multiple users simultaneously.
Tom worked with me directly to implement the JAR file as a Geoprocessing services instead of the Print SOE capability on the MAp service.  The GP task solved my problem with simultaneous tool access.  Tom's instructions are below.

...

You can reuse the same JAR-file:
  from http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/index.html#/Develop_and_Deploy/...
Deploy to ArcGIS
After creating a custom geoprocessing function tool and its associated custom function factory, you must deploy the custom tool class and its function factory to ArcGIS. The Java .class files of the function tool and the function factory are bundled in a Java Archive (JAR) file and deployed to ArcGIS by placing the JAR file in the <ArcGIS Install Dir>/java/lib/ext folder.
An ArcGIS application (ArcGIS Engine, ArcMap, ArcCatalog, or ArcGIS Server) recognizes the JAR file as a custom geoprocessing function tool when the application is started. If the ArcGIS application is already running, you'll need to restart it after the JAR file is deployed. In the case of testing, if you modify the code in the Java classes that are bundled in the JAR file, the JAR file must be recreated and redeployed. You also need to restart the ArcGIS application after redeployment.
Once the custom geoprocessing function tool and function factory Java classes are created and deployed to ArcGIS, they can be accessed from ArcToolbox (in ArcMap or ArcCatalog) in the same manner as other ArcGIS geoprocessing tools.
In an ArcGIS Engine application, the deployed custom tool must be consumed by creating a toolbox. The toolbox that contains the custom geoprocessing tool must be published to the server and can be consumed in server applications in the same manner as other ArcGIS geoprocessing tools.

Try to deploy it and then use it as:
http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/index.html#/Consuming_Custom_GP...
0 Kudos
TomSchuller
Frequent Contributor
Some news concerning the PchPrintSOE and it's widget:
Let me know about your experience and feature request by the BitBucket issue system.

Tom
0 Kudos
JeffersonFerreira_Ferreira
Deactivated User
Hi  all;

I'm having a strange issue. Hope someone, or Tom, can give me a hand.
The Widget was working great, so suddenly an error is appearing.

An error occurs during print: 500 / faultCode:Server.Error.Request faultString:'Erro de solicitação HTTP' faultDetail:'Erro: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://myhost/ArcGIS/rest/services/layout2/MapServer/exts/PCHPrintSOE/printLayout'

The server's verbose log and my Debug informations are atttached, but I'm thinking that the key is at this line in verbose log: <Msg time='2012-10-01T17:56:24' type='ERROR' code='8001' target='layout2.MapServer' machine='LAB-ARCGIS-10' user='?' process='10108' thread='15380' elapsed='0.00000'>addPChPrintSOEMapServiceLayer.*.jsonResp IS NOT A VALID JSON-Format !!!</Msg>


Thanks
0 Kudos