Select to view content in your preferred language

Advanced print solution

46689
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
EricVenden
Occasional Contributor II
Tom,
Attached is a text file that contains the results of the print..I copied the info from Fiddler...
The following is the URL..but the text file contains more info.
http://gis-srv3.village.gurnee.il.us/ArcGIS/rest/services/layout/MapServer/exts/PCHPrintSOE/printLay...

Let me know if you need more info.
Thank you
Eric
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
is the layer correctly loaded in the mxd? Could you make a print-screen of the ArcMAP?

As far I see, is the mapservice correctly loaded and the data should be displayed.

Could you try to load the mapservice manually and compare the difference in the layer properties?

Tom
0 Kudos
DavidCaussin
New Contributor III
Tom,

Little feed back ....

I have find the rpoblem.

There was a problem with the web.config file in ArcGis/services directory.
When it was resolve, just whange the authentication and that was .....

Thanks a lot for All.

I'm a little surprise of the quality of the pdf at 300dpi. Do you think that it is normal? Do you use cached services?

Do you know if it is possible to implement with a direct print to printer????

David
0 Kudos
TomSchuller
Occasional Contributor III
For high quality printouts, you have to enable the PrintSOE on the mapservices you want to print.
This will use the direct datasource instead of the mapservice itself for printing.
Compare the generated mxd's.

If there is a need for additional configurations, try them out in ArcMAP and let it me know.

Did you think on a direct print in the Flex widget?

Tom
0 Kudos
DavidCaussin
New Contributor III

Did you think on a direct print in the Flex widget?


No in the widget you use. Instead of export into PDF, direct print to a printer .

David
0 Kudos
EricVenden
Occasional Contributor II
Eric,
is the layer correctly loaded in the mxd? Could you make a print-screen of the ArcMAP?

As far I see, is the mapservice correctly loaded and the data should be displayed.

Could you try to load the mapservice manually and compare the difference in the layer properties?

Tom


Good morning Tom,
I loaded the parcels map service in a new mxd and it appears as it should (see attached image).  I also loaded the output mxd from the Print widget.  All layers appear, but the parcels.  The parcels appear in the TOC and they are shown to be turned on.  I have attached this image as well.
Thank you Tom
Eric
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
could you see any difference in the layer properties?
You can also try to configure the paper settings in the working mxd to the same settings than the generated mxd.

You can also save the non-working layer to a .lyr file and add it to the working mxd. And vice-versa?
What is happening?

Tom
0 Kudos
EricVenden
Occasional Contributor II
Hi Tom,
By "working" mxd, do you mean the layout mxd created for the print function?
Thanks
Eric
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
working mxd: your manually created mxd with the working parcel layer
generated mxd: mxd generated during the print phase in your arcgisouput directory (non-working mxd)

working layer: parcel layer in your working mxd
non-working layer: parcle layer in your non-working mxd (generated mxd)

Tom
0 Kudos
EricVenden
Occasional Contributor II
Tom,
I saved the parcels (service) from the print-generated mxd (non-working) out to a layer and loaded it in a blank mxd - it did not display, even though there were no errors.  The dialog said "drawing tiles".

I then loaded the parcels service into a "new" mxd - it displayed properly.  I then saved this out to a layer file and loaded this layer file into a new mxd and it displayed properly.   I also loaded this layer file into the same mxd from above (the mxd that contained the exported layer file from the print function) and it also displayed there.

Not sure what to make of this.
Thank you
Eric
0 Kudos