Printing to geopdf

5142
9
Jump to solution
06-02-2014 01:46 PM
TammyBearly
New Contributor
I am using the JavaScript API and PrintTask. Is there a way to print to a geopdf? I see that ArcGIS can export it.
0 Kudos
1 Solution

Accepted Solutions
ScottGunn
New Contributor III
Thanks for the reply. Does anyone know how to get a geo pdf from the arcgis server from javascript?


How about using Python in a Geoprocessing task?

I haven't tried this but I wonder if it would work.  You could first use:
http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006n000000
"Convert Web Map to Map Document"

Then feed that map document into ArcPy's ExportToPDF:
http://resources.arcgis.com/en/help/main/10.1/#/ExportToPDF/00s300000027000000/

which looks like it can create GeoPDFs.

View solution in original post

0 Kudos
9 Replies
Noah-Sager
Esri Regular Contributor
Hi Tammy,

These are the valid output formats of the JavaScript API and the Print Task:
pdf | png32 | png8 | jpg | gif | eps | svg | svgz

More information about this can be found in the Class: PrintTemplate

These are the valid output formats of the Export Map Operation:
png | png8 | png24 | jpg | pdf | bmp | gif | svg | png32

More information about this can be found in the REST API.

Hope this helps!

-Noah
0 Kudos
TammyBearly
New Contributor
Yes, I am aware of that. But I want a "geo" pdf. Is the pdf that is produced a geo pdf?
0 Kudos
Noah-Sager
Esri Regular Contributor
Hi Tammy,

Sorry for the confusion. To the best of my knowledge, it is not possible to generate a "geopdf" with the JavaScript API and the Print Task. The pdf that is produced is just a "pdf". There may be some alternative solutions to this issue, but I am unaware of them of this time.

-Noah
0 Kudos
TammyBearly
New Contributor
Thanks for the reply. Does anyone know how to get a geo pdf from the arcgis server from javascript?
0 Kudos
ScottGunn
New Contributor III
Thanks for the reply. Does anyone know how to get a geo pdf from the arcgis server from javascript?


How about using Python in a Geoprocessing task?

I haven't tried this but I wonder if it would work.  You could first use:
http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006n000000
"Convert Web Map to Map Document"

Then feed that map document into ArcPy's ExportToPDF:
http://resources.arcgis.com/en/help/main/10.1/#/ExportToPDF/00s300000027000000/

which looks like it can create GeoPDFs.
0 Kudos
TammyBearly
New Contributor
How about using Python in a Geoprocessing task?

I haven't tried this but I wonder if it would work.  You could first use:
http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006n000000
"Convert Web Map to Map Document"

Then feed that map document into ArcPy's ExportToPDF:
http://resources.arcgis.com/en/help/main/10.1/#/ExportToPDF/00s300000027000000/

which looks like it can create GeoPDFs.


Thanks this looks promising!
0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Hi Tammy, did you get this working?  I am trying to do the exact same thing, but just starting the process..so trying to sef if it exists first.

0 Kudos
BrandonVan_Horn
Occasional Contributor

Tammy,

This is available just add some extra parameters. Here is how it works

Printparams.extraParameters = { Georef_info: "True" };

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Tammy, are you accessing the default Print service that you can create in  ArcGIS Server 10.2.2?  I have been messing around with creating a custom print service, which I may still need to do to get some additional text on the map.  In doing so, I tested the output pdf and realized that is it in fact a geoPDF.  this is the case using when using my print service thru ArcGIS Online too (as AGOL administrator, I set my organization to point to our local service).

To test, save the .pdf and open it in Adobe Reader or Acrobat Pro.

  • In Reader, you need to "Enable All Features", then in the Edit tool bar, select Analyst->Geospation_Location_Tool.  You coordinates should display at the bottom
  • In Acrobat, under tools, in the pulldown, check to display the Analyze toolbox (if not showing). Expand the toolbox and select Geospatial Location Tool.  (side note: The adding of the Analyze toolbar "sticks" for me, vs the Reader which seems to ask me each time to enable all features.)

On my mobile device (ipad) I was able to open up in the free Avenza app by using the built in "open in" options of both Safari and Chrome.

I also tested this using some of the samples in Print webmap | ArcGIS API for JavaScript   In particular I explored this one, "print webmap" using the "explorer in the sandbox" option. I changed 1) the mapid to one of my own (from ArcGIS Online), 2) the extent and special reference (mine is not the standard web mercator). and 3) I again pointed to my local service).  I then test this, and it also came out as a geoPDF.  My guess is it would do the same with the Print | ArcGIS API for JavaScript  sample, but that will take a bit more testing to get my data and service inserted.

I hope this helps.

-b

(p.s,..IF this does answer the question, please make it as such so others can find it.)