Select to view content in your preferred language

Advanced print solution

46759
296
02-19-2011 10:52 AM
TomSchuller
Occasional Contributor III
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
DavidCaussin
New Contributor III
Tom,

Thus if i understand, it can not working because i'm only working in intranet.
The server is not accessible via internet ....
I must ask to the informatica service to open the server for internet???

Am i just?

David
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
I didn't found yet a timeslot to develop it 😞

David,
you can use your own mapservice as "Internet Services". Whese mapservices are accessed over the http protocol instead of the DCOM protocol. You find this in your ArcGIS server documentation.

Tom
0 Kudos
EricVenden
Occasional Contributor II
Tom..I think I may have figured out the scaling issue...I was mainly referring to the output print leaving off 1 map service.

Thank you for your time.
Eric
0 Kudos
TomSchuller
Occasional Contributor III
all,
did all the problems solved around?
It's very difficult to have an overview of all the posts/questions.

Eric,
is the "inch/feet" feature solved?

Any other suggestions/ideas?

Tom
0 Kudos
EricVenden
Occasional Contributor II
Tom,
I know you are being pulled many different directions with these forum posts and I do appreciate you looking into the issues I have been experiencing.

I haven't yet solved the inch/ft issue, but I've found that if I pick 1:200 (1=2400) for a map scale, the resultant PDF map scale is 1=7874 - it's off by a factor of 3.28 (ft to meters)...so I must be missing something in the code.

The other issue - where the PDF output does not show features from 1 map service.  The output mxd (on the server) contains the features from this "missing" service in the legend, but they do not display in the map (which concurs with the PDF).  The URL that gets posted by the PCHPrintSOE/printLayout reference the Parcels map service...can you think of anything that would be in this map service that would cause it to be left off the printout?  I do remember you saying that you only need to enable the PCHPrintSOE on the layout service, correct?

Thank you for your time Tom.
Eric
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
I just finished a first version of the inch/cm support.

You can download it here:
beta_version

In the PrintWidget.xml, you have to indicate your paper units (1=inch, 8=cm).
The map-units are taken from the (Projected-)SpatialReference.
Currently, there is support for "meter" and "feet".

Any feedback is welcome.

Tom
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
for the problem concerning the non-shown feature in the mapservice,
could you please post the complete url of the PrintSOE and the generated mxd file.

If you want to print mapservices, you don't need to enable the "PCHPrintSOE".
If the PCHPrintSOE isn't enabled, it's taking the data from the mapservice (poor quality on large printouts).
If the PCHPrintSOE is enabled, it's taking the datasource directly from the mapservice. Used for high quality printouts.

You can take a look in the generated mxd to see the difference. Just check the source of the different layers.


Tom
0 Kudos
EricVenden
Occasional Contributor II
Thanks for update Tom - I'll try out the update.  Are the changes specific to only the Flex widget?  I was curious if I would have to update the jar file.

Regarding the map service that is left off the print...My Flex site is made up of numerous services.  It appears that the service containing parcel information is not being displayed.  It shows in the legend, but not on the map.  The layers from that service are listed in the mxd (toc), but not displayed.

Thanks again Tom.
Eric
0 Kudos
TomSchuller
Occasional Contributor III
You have to update both, the flex and java part.
The java part is also very simple. Override the old jar and restart your arcgis server.

Could you try to find out why your parcel layer isn't display in the mxd.
If you say the layer is in the mxd, the PrintSOE seems to work.

You can also upload the generated mxd, so I will take a look on it.

Tom
0 Kudos
deressoderesso
New Contributor
Dear  Tom, I am using my own map services on ur flex widget but for some reasons i am getting an error "An error occurs during print". Any idea what actually might be wrong.
regards,
0 Kudos