import arcpy mxd=arcpy.mapping.MapDocument(r"I:\GIS_Workspace\Ventura_Area\Danny\SAPTList.mxd") mainDF = arcpy.mapping.ListDataFrames(mxd, "Layers") [0] mainDF.zoomToSelectedFeatures() arcpy.RefreshActiveView();arcpy.RefreshTOC() arcpy.mapping.ExportToPDF (mxd,r"I:\GIS_Workspace\Ventura_Area\Danny\SAPT_MAP.pdf")