Export all data driven pages to PDF using Python script The Next CEO of Stack OverflowHow to Prevent Data Driven Pages From Hanging on Subsequent Export?Python Script to Create Table Using Data Driven PagesData Driven Pages and exporting PDF using PythonExport some specific pages from data driven pages to pdf file by pythonExporting Selected Data Driven Pages to PDF using ArcPy?How to export a MXD to a PDF but only switching the folderData Driven pages, printing from mapsets not working, ArcGIS Desktop 10.2.1Data Driven Pages Export IssueAutomating Multi Data Driven Pages Maps Export to PDF?Data Driven Pages Navigation in a Script

Does it take more energy to get to Venus or to Mars?

Text adventure game code

Is it a good idea to use COLUMN AS (left([Another_Column],(4)) instead of LEFT in the select?

Inappropriate reference requests from Journal reviewers

Science fiction (dystopian) short story set after WWIII

Term for the "extreme-extension" version of a straw man fallacy?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

Only print output after finding pattern

How to write papers efficiently when English isn't my first language?

Rotate a column

What is the difference between "behavior" and "behaviour"?

Is the concept of a "numerable" fiber bundle really useful or an empty generalization?

Trouble understanding the speech of overseas colleagues

Describing a person. What needs to be mentioned?

How to write the block matrix in LaTex?

How to make a variable always equal to the result of some calculations?

Solution of this Diophantine Equation

Whats the best way to handle refactoring a big file?

How to make a software documentation "officially" citable?

Why do remote companies require working in the US?

MAZDA 3 2006 (UK) - poor acceleration then takes off at 3250 revs

% symbol leads to superlong (forever?) compilations

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?



Export all data driven pages to PDF using Python script



The Next CEO of Stack OverflowHow to Prevent Data Driven Pages From Hanging on Subsequent Export?Python Script to Create Table Using Data Driven PagesData Driven Pages and exporting PDF using PythonExport some specific pages from data driven pages to pdf file by pythonExporting Selected Data Driven Pages to PDF using ArcPy?How to export a MXD to a PDF but only switching the folderData Driven pages, printing from mapsets not working, ArcGIS Desktop 10.2.1Data Driven Pages Export IssueAutomating Multi Data Driven Pages Maps Export to PDF?Data Driven Pages Navigation in a Script










2















I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd). I currently have the script below which works for exporting single pages. And the highlighted section was my initial (poor) attempt to export all pages based on what I have seen or read.



# Python script to run in windows.
# 1) Copy script into folder to run script
# 2) Edit quality and dpi variables if desired

import arcpy, os

# get current directory python script is in
cwd = os.getcwd()

# quality to export, BEST, BETTER, NORMAL, FASTER, FASTEST
quality = "BEST"
# dots per inch resolution
dpi = "300"
res = int(dpi)

# Ask user to confirm settings and directory
print "Export ArcMap MXD(s) to PDF(s), " + quality + " Quality, " + dpi + "dpi to " + cwd + "?"

# pauses for user to press key to continue
os.system('pause')

# set folder path to current directory
folderPath = cwd

# prints message to console for user
print "IN PROGRESS...PLEASE WAIT..."

# counter to count number of PDFs
n = 0

# create fullpath from filename and folder path
for filename in os.listdir(folderPath):
fullpath = os.path.join(folderPath, filename)
# extract file extension
if os.path.isfile(fullpath):
basename, extension = os.path.splitext(fullpath)
if extension.lower() == ".mxd":
# advance counter to count PDFs
n = n + 1
mxd = arcpy.mapping.MapDocument(fullpath)
# export tool with parameters
arcpy.mapping.ExportToPDF(mxd, basename + '.pdf', resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
print basename + "...exported"

del mxd

# prints message to console for user
nstr = str(n)
print nstr + " pdf(s) exported to " + folderPath
print "DONE"

# pauses for user to press key to continue
os.system('pause')









share|improve this question



















  • 1





    Please include code as text rather than as a picture so that it can be searched. There is a format button to make it look nice.

    – PolyGeo
    Feb 5 '16 at 19:38















2















I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd). I currently have the script below which works for exporting single pages. And the highlighted section was my initial (poor) attempt to export all pages based on what I have seen or read.



# Python script to run in windows.
# 1) Copy script into folder to run script
# 2) Edit quality and dpi variables if desired

import arcpy, os

# get current directory python script is in
cwd = os.getcwd()

# quality to export, BEST, BETTER, NORMAL, FASTER, FASTEST
quality = "BEST"
# dots per inch resolution
dpi = "300"
res = int(dpi)

# Ask user to confirm settings and directory
print "Export ArcMap MXD(s) to PDF(s), " + quality + " Quality, " + dpi + "dpi to " + cwd + "?"

# pauses for user to press key to continue
os.system('pause')

# set folder path to current directory
folderPath = cwd

# prints message to console for user
print "IN PROGRESS...PLEASE WAIT..."

# counter to count number of PDFs
n = 0

# create fullpath from filename and folder path
for filename in os.listdir(folderPath):
fullpath = os.path.join(folderPath, filename)
# extract file extension
if os.path.isfile(fullpath):
basename, extension = os.path.splitext(fullpath)
if extension.lower() == ".mxd":
# advance counter to count PDFs
n = n + 1
mxd = arcpy.mapping.MapDocument(fullpath)
# export tool with parameters
arcpy.mapping.ExportToPDF(mxd, basename + '.pdf', resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
print basename + "...exported"

del mxd

# prints message to console for user
nstr = str(n)
print nstr + " pdf(s) exported to " + folderPath
print "DONE"

# pauses for user to press key to continue
os.system('pause')









share|improve this question



















  • 1





    Please include code as text rather than as a picture so that it can be searched. There is a format button to make it look nice.

    – PolyGeo
    Feb 5 '16 at 19:38













2












2








2


1






I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd). I currently have the script below which works for exporting single pages. And the highlighted section was my initial (poor) attempt to export all pages based on what I have seen or read.



# Python script to run in windows.
# 1) Copy script into folder to run script
# 2) Edit quality and dpi variables if desired

import arcpy, os

# get current directory python script is in
cwd = os.getcwd()

# quality to export, BEST, BETTER, NORMAL, FASTER, FASTEST
quality = "BEST"
# dots per inch resolution
dpi = "300"
res = int(dpi)

# Ask user to confirm settings and directory
print "Export ArcMap MXD(s) to PDF(s), " + quality + " Quality, " + dpi + "dpi to " + cwd + "?"

# pauses for user to press key to continue
os.system('pause')

# set folder path to current directory
folderPath = cwd

# prints message to console for user
print "IN PROGRESS...PLEASE WAIT..."

# counter to count number of PDFs
n = 0

# create fullpath from filename and folder path
for filename in os.listdir(folderPath):
fullpath = os.path.join(folderPath, filename)
# extract file extension
if os.path.isfile(fullpath):
basename, extension = os.path.splitext(fullpath)
if extension.lower() == ".mxd":
# advance counter to count PDFs
n = n + 1
mxd = arcpy.mapping.MapDocument(fullpath)
# export tool with parameters
arcpy.mapping.ExportToPDF(mxd, basename + '.pdf', resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
print basename + "...exported"

del mxd

# prints message to console for user
nstr = str(n)
print nstr + " pdf(s) exported to " + folderPath
print "DONE"

# pauses for user to press key to continue
os.system('pause')









share|improve this question
















I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd). I currently have the script below which works for exporting single pages. And the highlighted section was my initial (poor) attempt to export all pages based on what I have seen or read.



# Python script to run in windows.
# 1) Copy script into folder to run script
# 2) Edit quality and dpi variables if desired

import arcpy, os

# get current directory python script is in
cwd = os.getcwd()

# quality to export, BEST, BETTER, NORMAL, FASTER, FASTEST
quality = "BEST"
# dots per inch resolution
dpi = "300"
res = int(dpi)

# Ask user to confirm settings and directory
print "Export ArcMap MXD(s) to PDF(s), " + quality + " Quality, " + dpi + "dpi to " + cwd + "?"

# pauses for user to press key to continue
os.system('pause')

# set folder path to current directory
folderPath = cwd

# prints message to console for user
print "IN PROGRESS...PLEASE WAIT..."

# counter to count number of PDFs
n = 0

# create fullpath from filename and folder path
for filename in os.listdir(folderPath):
fullpath = os.path.join(folderPath, filename)
# extract file extension
if os.path.isfile(fullpath):
basename, extension = os.path.splitext(fullpath)
if extension.lower() == ".mxd":
# advance counter to count PDFs
n = n + 1
mxd = arcpy.mapping.MapDocument(fullpath)
# export tool with parameters
arcpy.mapping.ExportToPDF(mxd, basename + '.pdf', resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
print basename + "...exported"

del mxd

# prints message to console for user
nstr = str(n)
print nstr + " pdf(s) exported to " + folderPath
print "DONE"

# pauses for user to press key to continue
os.system('pause')






arcpy data-driven-pages






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 13 '18 at 2:33









Jamie Bull

162110




162110










asked Feb 5 '16 at 13:03









Harry Catharell-HargreavesHarry Catharell-Hargreaves

395




395







  • 1





    Please include code as text rather than as a picture so that it can be searched. There is a format button to make it look nice.

    – PolyGeo
    Feb 5 '16 at 19:38












  • 1





    Please include code as text rather than as a picture so that it can be searched. There is a format button to make it look nice.

    – PolyGeo
    Feb 5 '16 at 19:38







1




1





Please include code as text rather than as a picture so that it can be searched. There is a format button to make it look nice.

– PolyGeo
Feb 5 '16 at 19:38





Please include code as text rather than as a picture so that it can be searched. There is a format button to make it look nice.

– PolyGeo
Feb 5 '16 at 19:38










2 Answers
2






active

oldest

votes


















6














I am a novice in Python as well, but I have a script that will do what it sounds like you are trying to do - export all pages of an MXD with Data Driven Pages to one PDF.



I run this through the toolbox in ArcCatalog or ArcMap. The MXD you are running it on does not have to be open.



#Set Input Parameters
mxd = arcpy.GetParameterAsText(0)
PDFpath = arcpy.GetParameterAsText(1)
PDFname = arcpy.GetParameterAsText(2)

#Create an MXD object
mxd_doc = arcpy.mapping.MapDocument(mxd)

#Export to DDP
ddp = mxd_doc.dataDrivenPages
ddp.exportToPDF(PDFpath + r"\" + PDFname + ".pdf", "ALL")
del mxd, mxd_doc, PDFname, PDFpath


I developed this code based on my question here:
How to Prevent Data Driven Pages From Hanging on Subsequent Export?






share|improve this answer

























  • Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

    – Harry Catharell-Hargreaves
    Feb 5 '16 at 14:53






  • 2





    @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

    – Sara Barnes
    Feb 5 '16 at 15:01






  • 2





    @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

    – Sara Barnes
    Feb 8 '16 at 13:43






  • 1





    What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

    – GIS Data Butcher
    Apr 19 '16 at 12:15







  • 1





    @GISDataButcher They should both be text strings.

    – Sara Barnes
    Apr 19 '16 at 12:18


















0














My code proposal :



import arcpy

# Set Input Parameters
mxd = r"C:TESTDATADRIVENData.mxd"
PDFpath = r"C:TESTDATADRIVENTesting.pdf"
dpi = "200"
res = int(dpi)
quality = "BEST"

# Create an MXD object
mxd_doc = arcpy.mapping.MapDocument(mxd)
mxd_doc.dataDrivenPages.exportToPDF(PDFpath, resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
del mxd_doc





share|improve this answer










New contributor




Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "79"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f179578%2fexport-all-data-driven-pages-to-pdf-using-python-script%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    6














    I am a novice in Python as well, but I have a script that will do what it sounds like you are trying to do - export all pages of an MXD with Data Driven Pages to one PDF.



    I run this through the toolbox in ArcCatalog or ArcMap. The MXD you are running it on does not have to be open.



    #Set Input Parameters
    mxd = arcpy.GetParameterAsText(0)
    PDFpath = arcpy.GetParameterAsText(1)
    PDFname = arcpy.GetParameterAsText(2)

    #Create an MXD object
    mxd_doc = arcpy.mapping.MapDocument(mxd)

    #Export to DDP
    ddp = mxd_doc.dataDrivenPages
    ddp.exportToPDF(PDFpath + r"\" + PDFname + ".pdf", "ALL")
    del mxd, mxd_doc, PDFname, PDFpath


    I developed this code based on my question here:
    How to Prevent Data Driven Pages From Hanging on Subsequent Export?






    share|improve this answer

























    • Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

      – Harry Catharell-Hargreaves
      Feb 5 '16 at 14:53






    • 2





      @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

      – Sara Barnes
      Feb 5 '16 at 15:01






    • 2





      @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

      – Sara Barnes
      Feb 8 '16 at 13:43






    • 1





      What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

      – GIS Data Butcher
      Apr 19 '16 at 12:15







    • 1





      @GISDataButcher They should both be text strings.

      – Sara Barnes
      Apr 19 '16 at 12:18















    6














    I am a novice in Python as well, but I have a script that will do what it sounds like you are trying to do - export all pages of an MXD with Data Driven Pages to one PDF.



    I run this through the toolbox in ArcCatalog or ArcMap. The MXD you are running it on does not have to be open.



    #Set Input Parameters
    mxd = arcpy.GetParameterAsText(0)
    PDFpath = arcpy.GetParameterAsText(1)
    PDFname = arcpy.GetParameterAsText(2)

    #Create an MXD object
    mxd_doc = arcpy.mapping.MapDocument(mxd)

    #Export to DDP
    ddp = mxd_doc.dataDrivenPages
    ddp.exportToPDF(PDFpath + r"\" + PDFname + ".pdf", "ALL")
    del mxd, mxd_doc, PDFname, PDFpath


    I developed this code based on my question here:
    How to Prevent Data Driven Pages From Hanging on Subsequent Export?






    share|improve this answer

























    • Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

      – Harry Catharell-Hargreaves
      Feb 5 '16 at 14:53






    • 2





      @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

      – Sara Barnes
      Feb 5 '16 at 15:01






    • 2





      @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

      – Sara Barnes
      Feb 8 '16 at 13:43






    • 1





      What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

      – GIS Data Butcher
      Apr 19 '16 at 12:15







    • 1





      @GISDataButcher They should both be text strings.

      – Sara Barnes
      Apr 19 '16 at 12:18













    6












    6








    6







    I am a novice in Python as well, but I have a script that will do what it sounds like you are trying to do - export all pages of an MXD with Data Driven Pages to one PDF.



    I run this through the toolbox in ArcCatalog or ArcMap. The MXD you are running it on does not have to be open.



    #Set Input Parameters
    mxd = arcpy.GetParameterAsText(0)
    PDFpath = arcpy.GetParameterAsText(1)
    PDFname = arcpy.GetParameterAsText(2)

    #Create an MXD object
    mxd_doc = arcpy.mapping.MapDocument(mxd)

    #Export to DDP
    ddp = mxd_doc.dataDrivenPages
    ddp.exportToPDF(PDFpath + r"\" + PDFname + ".pdf", "ALL")
    del mxd, mxd_doc, PDFname, PDFpath


    I developed this code based on my question here:
    How to Prevent Data Driven Pages From Hanging on Subsequent Export?






    share|improve this answer















    I am a novice in Python as well, but I have a script that will do what it sounds like you are trying to do - export all pages of an MXD with Data Driven Pages to one PDF.



    I run this through the toolbox in ArcCatalog or ArcMap. The MXD you are running it on does not have to be open.



    #Set Input Parameters
    mxd = arcpy.GetParameterAsText(0)
    PDFpath = arcpy.GetParameterAsText(1)
    PDFname = arcpy.GetParameterAsText(2)

    #Create an MXD object
    mxd_doc = arcpy.mapping.MapDocument(mxd)

    #Export to DDP
    ddp = mxd_doc.dataDrivenPages
    ddp.exportToPDF(PDFpath + r"\" + PDFname + ".pdf", "ALL")
    del mxd, mxd_doc, PDFname, PDFpath


    I developed this code based on my question here:
    How to Prevent Data Driven Pages From Hanging on Subsequent Export?







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:34









    Community

    1




    1










    answered Feb 5 '16 at 13:19









    Sara BarnesSara Barnes

    1,7831537




    1,7831537












    • Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

      – Harry Catharell-Hargreaves
      Feb 5 '16 at 14:53






    • 2





      @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

      – Sara Barnes
      Feb 5 '16 at 15:01






    • 2





      @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

      – Sara Barnes
      Feb 8 '16 at 13:43






    • 1





      What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

      – GIS Data Butcher
      Apr 19 '16 at 12:15







    • 1





      @GISDataButcher They should both be text strings.

      – Sara Barnes
      Apr 19 '16 at 12:18

















    • Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

      – Harry Catharell-Hargreaves
      Feb 5 '16 at 14:53






    • 2





      @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

      – Sara Barnes
      Feb 5 '16 at 15:01






    • 2





      @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

      – Sara Barnes
      Feb 8 '16 at 13:43






    • 1





      What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

      – GIS Data Butcher
      Apr 19 '16 at 12:15







    • 1





      @GISDataButcher They should both be text strings.

      – Sara Barnes
      Apr 19 '16 at 12:18
















    Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

    – Harry Catharell-Hargreaves
    Feb 5 '16 at 14:53





    Hi thanks for the reply! I think you are a few levels above me in terms of Python as I did not even write the script I copied above. What do I need to do to the script that you have provided? Do I combine it with my original script or just copy it in to the python window in the geoprocessing drop down menu? Sorry for my incompetence!

    – Harry Catharell-Hargreaves
    Feb 5 '16 at 14:53




    2




    2





    @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

    – Sara Barnes
    Feb 5 '16 at 15:01





    @HarryCatharell-Hargreaves To run the script, copy the text into a text file (notepad or something) and save it with a .py extension. Then you can add it into ArcMap by doing this: desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/…

    – Sara Barnes
    Feb 5 '16 at 15:01




    2




    2





    @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

    – Sara Barnes
    Feb 8 '16 at 13:43





    @HarryCatharell-Hargreaves If this answered your question, please mark it as "answered." You can learn more here: gis.stackexchange.com/tour

    – Sara Barnes
    Feb 8 '16 at 13:43




    1




    1





    What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

    – GIS Data Butcher
    Apr 19 '16 at 12:15






    What would be data type for this parameters while setting in arctoolbox. mxd = arcpy.GetParameterAsText(0) PDFpath = arcpy.GetParameterAsText(1) PDFname = arcpy.GetParameterAsText(2)

    – GIS Data Butcher
    Apr 19 '16 at 12:15





    1




    1





    @GISDataButcher They should both be text strings.

    – Sara Barnes
    Apr 19 '16 at 12:18





    @GISDataButcher They should both be text strings.

    – Sara Barnes
    Apr 19 '16 at 12:18













    0














    My code proposal :



    import arcpy

    # Set Input Parameters
    mxd = r"C:TESTDATADRIVENData.mxd"
    PDFpath = r"C:TESTDATADRIVENTesting.pdf"
    dpi = "200"
    res = int(dpi)
    quality = "BEST"

    # Create an MXD object
    mxd_doc = arcpy.mapping.MapDocument(mxd)
    mxd_doc.dataDrivenPages.exportToPDF(PDFpath, resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
    del mxd_doc





    share|improve this answer










    New contributor




    Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0














      My code proposal :



      import arcpy

      # Set Input Parameters
      mxd = r"C:TESTDATADRIVENData.mxd"
      PDFpath = r"C:TESTDATADRIVENTesting.pdf"
      dpi = "200"
      res = int(dpi)
      quality = "BEST"

      # Create an MXD object
      mxd_doc = arcpy.mapping.MapDocument(mxd)
      mxd_doc.dataDrivenPages.exportToPDF(PDFpath, resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
      del mxd_doc





      share|improve this answer










      New contributor




      Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        0












        0








        0







        My code proposal :



        import arcpy

        # Set Input Parameters
        mxd = r"C:TESTDATADRIVENData.mxd"
        PDFpath = r"C:TESTDATADRIVENTesting.pdf"
        dpi = "200"
        res = int(dpi)
        quality = "BEST"

        # Create an MXD object
        mxd_doc = arcpy.mapping.MapDocument(mxd)
        mxd_doc.dataDrivenPages.exportToPDF(PDFpath, resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
        del mxd_doc





        share|improve this answer










        New contributor




        Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        My code proposal :



        import arcpy

        # Set Input Parameters
        mxd = r"C:TESTDATADRIVENData.mxd"
        PDFpath = r"C:TESTDATADRIVENTesting.pdf"
        dpi = "200"
        res = int(dpi)
        quality = "BEST"

        # Create an MXD object
        mxd_doc = arcpy.mapping.MapDocument(mxd)
        mxd_doc.dataDrivenPages.exportToPDF(PDFpath, resolution=res, image_quality=quality, colorspace="RGB", picture_symbol="VECTORIZE_BITMAP", layers_attributes="NONE")
        del mxd_doc






        share|improve this answer










        New contributor




        Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer








        edited 17 hours ago









        J. Monticolo

        1,181217




        1,181217






        New contributor




        Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered yesterday









        ManuManu

        1




        1




        New contributor




        Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Manu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f179578%2fexport-all-data-driven-pages-to-pdf-using-python-script%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            រឿង រ៉ូមេអូ និង ហ្ស៊ុយលីយេ សង្ខេបរឿង តួអង្គ បញ្ជីណែនាំ

            QGIS export composer to PDF scale the map [closed] Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Print Composer QGIS 2.6, how to export image?QGIS 2.8.1 print composer won't export all OpenCycleMap base layer tilesSave Print/Map QGIS composer view as PNG/PDF using Python (without changing anything in visible layout)?Export QGIS Print Composer PDF with searchable text labelsQGIS Print Composer does not change from landscape to portrait orientation?How can I avoid map size and scale changes in print composer?Fuzzy PDF export in QGIS running on macSierra OSExport the legend into its 100% size using Print ComposerScale-dependent rendering in QGIS PDF output

            PDF-ში გადმოწერა სანავიგაციო მენიუproject page