Select to view content in your preferred language

Problem while performing Export to PDF

3122
10
06-11-2013 09:46 AM
VikramS
Occasional Contributor
Hello all ,

I am creating a map for each feature in a feature class . I export the map to pdf using python . When i open the map ,I see there are bits and pieces of line features . I suspect I am refreshing my activeview just before exporting the pdf . Before refresh process completes , export to pdf executes and gives me this problem . I am using ArcGIS 10 . Can anyone please help me

df = arcpy.mapping.ListDataFrames(mxd)[0]
df.extent = extent
arcpy.RefreshActiveView()
arcpy.mapping.ExportToPDF(mxd,os.path.join(Report_Path,str(oid).upper()))
Tags (2)
0 Kudos
10 Replies
NilsBabel
Occasional Contributor II

We did have a bug for issues with exporting to PDF when running it in the Python Window:


Not sure if this is related to the bug, but I've been trying to use ExportToPDF on a map document with a graph in the layout.  Running the script from python the PDF would only show the location of the graph and the name (sort of a draft layout) but not the actual graph.  I came across this post and hooked up my script to a toolbox script tool and voila! I get the actual graph in the pdf.  Glad I found this post. 

I'm using 10.1.  The problem doesn't seem limited to ExportToPDF, I tried ExportToPNG and got the same result.

Thanks.
0 Kudos