Select to view content in your preferred language

Advanced print solution

53529
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
TomSchuller
Frequent Contributor
great,
could we just check why you got the wrong download files?
Could you post you download link and maybe how you got it?

Tom
0 Kudos
EricVenden
Frequent Contributor
Tom,

The link you sent:   http://bitbucket.schuller.lu/pchprintwidget/src

I just tried it out and it appears that all the files are now there...could be my cache hadn't been cleared?

You had asked about what tweaks I was doing to the code - all I do is change the labels in the widget, change the size of the widget and comment out some options (although I see you can now eliminate some options in the xml file)
Thanks Tom
Eric V

great,
could we just check why you got the wrong download files?
Could you post you download link and maybe how you got it?

Tom
0 Kudos
TomSchuller
Frequent Contributor
Eric,
let me know about here labels and the things you disabled.
I will add it to be configurable in the xml file.

Tom
0 Kudos
EricVenden
Frequent Contributor
Tom,
I change the labels of all the "sections" in the widget, change the size of the widget (overall) and I disable the "auto placement" option.

How difficult would it be to add a "background color" (white is fine) for the Map Title?  I'm looking at the code and am wondering if I could just add the appropriate "properties" to the PopUp_text element.  As it is now, map features often block the Map Title making it hard to read.

Thanks Tom
Eric

Eric,
let me know about here labels and the things you disabled.
I will add it to be configurable in the xml file.

Tom
0 Kudos
TomSchuller
Frequent Contributor
Eric,
would this be ok as title background? See attachment

I just updated the BitBucket sourcecode and binaries for the SOE and the widget:
http://bitbucket.schuller.lu/pchprintwidget/changeset/7db4aa887f14/
http://bitbucket.schuller.lu/pchprintsoe/changeset/069e396f5e75/

Tom
0 Kudos
EricVenden
Frequent Contributor
Tom,

Yes, that is it...I'm assuming there is a choice (or I could configure) the background color?

I tried implementing it on my end to no avail - yet.

I will try the code you posted.
Thanks much
Eric V


Eric,
would this be ok as title background? See attachment

I just updated the BitBucket sourcecode and binaries for the SOE and the widget:
http://bitbucket.schuller.lu/pchprintwidget/changeset/7db4aa887f14/
http://bitbucket.schuller.lu/pchprintsoe/changeset/069e396f5e75/

Tom
0 Kudos
EricVenden
Frequent Contributor
Tom,
I updated the files - java (stopped AGS services, etc) and flex widget files (xml & swf) - I get an error when printing.  I cleared the REST cache - is there something on the java end of things that I need to clear?

Thanks
Eric

Tom,

Yes, that is it...I'm assuming there is a choice (or I could configure) the background color?

I tried implementing it on my end to no avail - yet.

I will try the code you posted.
Thanks much
Eric V
0 Kudos
evanpicard
Emerging Contributor
I am trying to install the Print SOE, and I'm a bit lost.

ArcGIS Server 10 .net
windows server 2008
Flex Viewer 2.5


When I enter the command at the command prompt:
C:\Program Files (x86)\ArcGIS\Server10.0\java\tools\soemanager> soemanager.bat -a MWELLAGSSERVER MWELLAGSSERVER administrator *password* PCHarcgisSOE.jar


Error: AutomationException occured while connecting to server MWELLAGSSERVER.
Please check if username and pwd are correct or are members of agsadmin group.
AutomationException: Access is denied.

*****************************
Administrator IS a member of agsadmin
what im not sure of is my domain name and server name?  im not sure i've seen any reference to a domain name thus far.  Its been a long day.
should I be using the IP address for the server name?

Please help, or someone point me to another tool to print a map with a legend in it!


Evan.


PS
I havent even gotten this far, but where are
*create an empty mxd and publish it as a "layout" mapservice
and
*enable the PrintSOE and the printMap operation on it
completed?
0 Kudos
TomSchuller
Frequent Contributor
Evan,
could you ping the "MWELLAGSSERVER"?
If not could you ping the ip-address?

Mostly the problem is coming from the firewall.

You could get more infos of this problem in my BitBucket:
http://bitbucket.schuller.lu/pchprintsoe/issue/3/error-trying-execute-soemanagerbat

Tom
0 Kudos
TomSchuller
Frequent Contributor
I havent even gotten this far, but where are
*create an empty mxd and publish it as a "layout" mapservice
and
*enable the PrintSOE and the printMap operation on it
completed?


Evan,

  1. open ArcMAP and save directly the map without any layers to 'layout.mxd'

  2. publish the layout.mxd as mapservice with the name 'layout'

  3. as soon you got the PchPrintSOE registered (post above), you can enable the extension PchPrintSOE on it with enale printMap operation



Tom
0 Kudos