Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Export to PDF Data Driven Pages

$
0
0
Hi, I'm new to Python and trying to write a script that will do the following:

1. Loop through all mxd's in a folder and edit a Text Element named "SubTitle"
2. Save the mxd
3. Export each mxd to pdf

The problem is there are some mxd's with Data Driven Pages enabled, so I can't get the script to export ALL pages of a multi-page map. I wrote an "if-else" so that I can distinguish the multi-page maps from the single page maps. Everything else works fine except for the ddp map.

The error msg I get:
ddp.ExportToPDF(mxd, basename, "ALL")
AttributeError: 'DataDrivenPages' object has no attribute 'ExportToPDF'

See attached screenshot of the code.


Attachment 31200
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG‎
Views:	N/A
Size:	62.1 KB
ID:	31200  

Viewing all articles
Browse latest Browse all 2485

Trending Articles