create vector file with printingtools service

2678
4
04-08-2016 05:22 PM
SeanNakasone
New Contributor II

Is there a way to create vector output (.ps file or .pdf) using the printingtools service?  The client will either be a javascript api or a runtime sdk app.  I tried specifying eps as the format, it created a .ps file, but after using ghostscript to convert it to pdf , it only had a picture in it.

If printingtools only generates pictures, is there another way to create vector output using the javascript api or runtime sdk ?

Thanks,

Sean

0 Kudos
4 Replies
TanuHoque
Esri Regular Contributor

the most common reason it happens is because in your webmap you use map service layers. As you know map services draw features on the server side and simply returns image to the client apps.. printing service, being a client of those map services, only draws those images that come back from map services... as a result you will not get vector outputs since output from map services are not vector output to begin with.

we have provided a tutorial how you can get vector outputs - it is only when those map services are yours and meet some criteria.

Tutorial: Basic web map printing and exporting using arcpy.mapping—Documentation | ArcGIS for Server

it is worth noting that when you ask for vector formats like pdf from printing service; printing service return feature layers and/or graphic layers (used in your web map) as vectors as long as they meet certain criteria such as no-transparencies, no picture symbol etc.

hope this helps.

SeanNakasone
New Contributor II

Thanks for the information.  You hit the nail right on the head.

I believe we can meet that requirement as our landbase will be vector as well, and I'll make sure that all of our fonts are TTF fonts.

However, there's one thing that confuses me.  In the example link that you sent, it looks like it is showing the Topographic basemap.  That's not vector right?

0 Kudos
TanuHoque
Esri Regular Contributor

Sean,

Yes, you are right... the tutorial is using a map and data that similar to Esri topo base map. And the output is a vector output.

But it does not matter whether it is a dynamic or cached map service. the logic is identical... (a) you need to have your data locally accessible as FeatureClasses to your print service, (b) the printing service is an arcpy based custom printing service, (c) the arcpy code replaces map service layer with FeatureLayers before exporting to any vector format.

hope this helps clear your confusion. otherwise, pls let me know.

thanks.

0 Kudos
SeanNakasone
New Contributor II

Thanks Tanu, I was able to create vector in the pdf, everything is clear when I zoom in.  You nailed it !!

0 Kudos