I have a small geoprocessing service that reads data-driven pages from an MXD, then exports a PDF.

 mxd = arcpy.mapping.MapDocument(mxd_path)
 mxd.dataDrivenPages.exportToPDF(r"\\test_report.pdf", "RANGE", page_range, "PDF_SINGLE_FILE", 300, "BEST", "RGB", True, "ADAPTIVE",
                            "RASTERIZE_BITMAP", False, True, "NONE", True, 80, False)

Where in the ArcGIS Server directory do I need to place the MXD I am trying to reference?

E.g. C:\arcgisserver\directories\arcgisjobs ?

  • It could be anywhere, as long as you have read/(write) access to it. It could be c:\temp, d:\something\something2\... Jan 15, 2018 at 23:05
  • Are you working for an organisation or is it a personal undertaking?
    – fatih_dur
    Jan 16, 2018 at 1:11
  • In fact saving your MXD to the server does not do what you trying to achieve. You need to publish your MXD as service (see this) in a folder of your choice.
    – fatih_dur
    Jan 16, 2018 at 1:24
  • Thanks for the advice. I ended up putting the MXD here, and it worked: C:\arcgisserver\directories\arcgisjobs Jan 16, 2018 at 15:41
  • Here is another helpful page describing the intention of each default directory on ArcGIS Server: enterprise.arcgis.com/en/server/latest/administer/windows/… Looks like the Jobs directory is the recommended place to "store files needed by geoprocessing services" Jan 16, 2018 at 16:23

1 Answer 1


Despite the fact you have a working solution, I'll add my 2 cents:

1) I wouldn't manually put anything in the JOBS directory. Yes, Server has access to this folder, but it places items there and removes them when it needs. Typically this is data generated by a gp service and returned to the client, not input data to a gp service.

2) Frankly, it doesn't matter where you start the source MXD. If you have it at c:\temp and while publishing have not setup your datastore, the publishing process will copy the MXD to the arcgisinput directory where the tool will reside and update the paths inside the script. If you do have a datastore entry setup, then the MXD is not copied and the script continues referencing the MXD in that place. (The act of registering the folder with the datastore ensures Server has at least read access to that particular directory)

  • Interesting. @KHibma, thanks for the additional info. Jan 17, 2018 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.