High quality print with Flex

1190
13
09-28-2010 05:09 AM
erictruchon
New Contributor
Hello

Our firm has developed an application in Flex and we publish the assessment roll for many municipalities.

Prior to Flex, we were using ArcIMS.

Some of our clients find that our print tool in Flex has lost quality from ArcIMS and I agree with them.

I watched the new version of the API in Flex (version 2.1) and I have not seen an example of printing tool in high quality. (just a snap shot)

I tried to find an example and I have not found. But I read that it would be possible to do it.

Where could I find a solution?

Thank you in advance

Greetings
Tags (2)
0 Kudos
13 Replies
JoshCalhoun1
New Contributor II
I would like to see something like this also.

thanks
0 Kudos
MichaelBishopp
Occasional Contributor
I'm all for seeing a solution to this question too.
0 Kudos
ReneRubalcava
Frequent Contributor
One solution would be to use the REST export to grab png's of the map service and stack them in Flex to send to print. This wouldn't grab any hand drawn graphics you have added though.
http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/export.html

I think high-quality prints would require server side ArcObjects to produce the image.
0 Kudos
EokNgo
by
New Contributor III
High quality vector output is possible.

With lots of trial and error, we managed to come up with a solution based on an ASP .Net web service that generates the map using a SOAP request and adding map elements on the server side.

See SOAP API on example of how to generate a map:
map services -> ExportMapImage
http://resources.esri.com/help/9.3/arcgisserver/apis/soap/index.htm

On the server side in the same map service, we used iTextSharp to edit the PDF output of the map to add things like a legend, scalebar, logos, etc. In order to create the legend and scalebar, we needed to use ArcObjects (hence the need to do this server side).

Hope this helps you get started.
0 Kudos
erictruchon
New Contributor
Hi hawkeye81x

Your solution is in ASP.Net. Do you think we can apply it with Flex (API)

I have a feeling it is not possible to consume a SOAP service.

Quote extracted from http://resources.esri.com/help/9.3/a...soap/index.htm

"Developer environments, such as .NET or Java, provide SOAP toolkits to automate the process of generating a set of local, native classes for a consumer"

Is it possible in Flex?
0 Kudos
erictruchon
New Contributor
Hi odoe

I did a test with Rest export and here the results

ArcMap export



Rest export



It's not the same size and output quality.

I'm looking for high quality print like Arcmap and ArcIMS

Greetings
0 Kudos
erictruchon
New Contributor
I'm sorry, i forgot images specifications

Same area
Same image format png
same dpi 300

thanks
0 Kudos
EokNgo
by
New Contributor III
Hi hawkeye81x

Your solution is in ASP.Net. Do you think we can apply it with Flex (API)

I have a feeling it is not possible to consume a SOAP service.

Quote extracted from http://resources.esri.com/help/9.3/a...soap/index.htm

"Developer environments, such as .NET or Java, provide SOAP toolkits to automate the process of generating a set of local, native classes for a consumer"

Is it possible in Flex?


The standard Flex SDK has the Webservice object you use to consume a web service, in my case an ASP .Net, web service. All you need to feed it is the wsdl and write the functions on how you want to handle the response:

Example:
<mx:WebService id="myWebService" showBusyCursor="false"
  wsdl="http://serverName/PDFProcessor/PDFService.asmx?wsdl">
     <mx:operation name="exportPDF"
             resultFormat="object"
             fault="getPDF_fault(event)"
             result="getPDF_result(event)">
     </mx:operation>
</mx:WebService>

There are plenty of good tutorials on how to create an ASP .Net web service if you don't experience with it. Just google it.

Of course I'm assuming you're using a Windows-based Server environment using IIS.

I've attached a Testmap (modified slightly to remove sensitive client info). But you can see the output is 300 DPI vector PDF.
0 Kudos
EokNgo
by
New Contributor III
I'm sorry, i forgot images specifications

Same area
Same image format png
same dpi 300

thanks


PNG is a raster based image format, so however you output it, it will eventually reveal jags when you zoom in close enough. Hence vector based output is more reliable for a consistent "high-quality" output. The rest endpoint does support PDF output as well. You can try that and see how it looks.
0 Kudos