Select to view content in your preferred language

Advanced print solution

46749
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
TomSchuller
Occasional Contributor III
for problems cou can make this checklist:
Is there a mxd file generated in the arcgisoutput directory?
   yes, is there generated the desired output file in the same directory (pdf, png, ...)
      yes, is the file accessible by the arcgisout url in a browser winwos
          yes, try to debug the flex part, the SOE is working fine
          no, check your webserver settings
      no pdf, there is a problem in the export part. Check the AGS server logs in verbose mode
   no mxd, the is a problem by interpreting the JSON part to configure the SOE. Check the url which is send to the SOE or maybe post it in the forum. I will take a look on it

Tom
0 Kudos
TomSchuller
Occasional Contributor III
Eric,
is the beta code running?

If yes, I can merge it in the "production" stream.

Tom
0 Kudos
deressoderesso
New Contributor
Dear Tom,
Thanks for you fast response. I am just a very junior guy on all those points u raised. I was able to run my map services on most of the the widgets developed with no problem. So I am assuming everything looks fine on my arcgis server side. here is one map service i have if it helps...http://129.2.24.163/ArcGIS/rest/services/Capstone_dderesso1/MapServer/14
0 Kudos
deressoderesso
New Contributor
Dear Tom,
You can actually see other widgets working fine on this link
http://129.2.24.163:8080/dderesso/flexviewer/index.html

Regards,
0 Kudos
TomSchuller
Occasional Contributor III
Hy,
did you followed the quickstart:
  http://gis.pch.etat.lu/flexViewerPrint/quickstart.html

I'm missing a "layout" service on your server (see point3).

Tom
0 Kudos
EricVenden
Occasional Contributor II
Eric,
is the beta code running?

If yes, I can merge it in the "production" stream.

Tom


Good morning Tom,
Yes, the beta works well with regards to printing in inches/ft.  I am still having issues with the output leaving out 1 map service, but have not had time to look a bit more into it.  I will send you the information you have previously requested at some point soon.
Thank you
Eric V
Gurnee, IL
0 Kudos
TomSchuller
Occasional Contributor III
Thanks Eric,
I uploaded the new code.

Let me know if I can help you with the missing mapservice (I would need mxd+ generated url).

Tom
0 Kudos
EricVenden
Occasional Contributor II
Good morning Tom,
I had the scale issue fixed, but I then downloaded your latest code and it appears to be broken again...I have changed line 19 in the PchPrintOutput.as file from 8 to 1 for inches.....I have also changed the config file for the widget to include the following:

  <Format label="8.5*11" height="11" width = "8.5" unit="in" />
  <Format label="11*17" height="17" width = "11" unit="in" /> 
  <Format label="17*22" height="22" width = "17" unit="in" /> 
  <Format label="24*36" height="36" width = "24" unit="in" />

and for scales:

  <Scale label="1:50" value="600"/>
  <Scale label="1:70" value="840"/>
  <Scale label="1:100" value="1200"/>
  <Scale label="1:150" value="1800"/>
  <Scale label="1:200" value="2400"/>
  <Scale label="1:300" value="3600"/>
  <Scale label="1:400" value="4800"/>
  <Scale label="1:500" value="6000"/>
  <Scale label="1:700" value="8400"/> 
  <Scale label="1:1000" value="12000"/>

However, when I pick a scale - 1:1000 for instance, the bounding box does not show the correct size and the resultant PDF says:  1:1440

This was working in the beta...
Thank you
Eric V
0 Kudos
EricVenden
Occasional Contributor II
Tom,
It appears that the "most recent" or "latest" code does not include the beta changes you had made.  I changed my source code from the latest code referenced on the Code Gallery to the beta code you had sent and now the print scales properly.  Not sure about the PCHarcgisSOE.jar file or the flex widget source code, but the latest xml config for the widget does not include the "unit=1" at the end of the page size....it still contains "unit=cm"

I am now going to look at the issue of the missing map service.
Thank you
Eric V
0 Kudos
DavidCaussin
New Contributor III
Hi Tom,

I still have the problem with the "internet connection" the MXD have the layers but with wrong path.

I have asked to Esri Belux where the problem could come from and they say that it is perhaps a problem with the firewall.

I have try a lot of solutions but with no luck

Could you explain how to make the map service available with the "internet connection" in AGS?

Thanks in advance.

David
0 Kudos