Solved! Go to Solution.
Hello Angelique,
After you've changed the page size (File > Print and Page Setup...) to A4, I think you basically just adjust the size of the dataframe (the map) in the layout view. Just use the Select Elements tool (black mouse pointer), click on the map element then move the corners of the dataframe so it fits the whole page. After that zoom to your desired area set set your scale.
To export the map, just go File > Export Map.... Note that exporting from layout view and exporting from data view will produce different results. Exporting from data view will only export the data on the screen, but it won't be the A4 dimensions. Exporting from layout view will produce everything within the page (that you have set to be A4).
Let me know if you get it working or not. Good luck!
import arcpy mxd=arcpy.mapping.MapDocument(r"C:\Path\To\Map.mxd") df=arcpy.mapping.ListDataFrames(mxd, "TargetDataFrameName")[0] #Make sure you choose enter the name of the dataframe you wish to export. arcpy.mapping.ExportToPDF(mxd,r"C:\Path\To\Output.pdf",df,df_export_width=1600,df_export_height=1200) del mxd