1

I designed a little arcpy script to export different layers in a data view to jpeg (world files included).

It's the first time I actually use arcpy but it works. The only drawback is that the labels which I set in my mxd, don't come out in the jpeg's as they appeared in the dataview. The labels in my exported jpegs (thus via arcpy) come out very small.

Does anyone know how this can be resolved? I want my jpegs exported with labels, the same way they appeared in the data view. If I adjust the font size in the mxd, nothing happens.

I use Arcmap 10.3 on a Windows 10 laptop.

Below a part of the script which refers to exporting.

if layer.name == "02_GWP_Res":  
    layer.visible = True  
    arcpy.RefreshActiveView()  
    outFile = r"C:\GISlokaal\ArcpyScripts\\" + layer.name + ".jpg"  
    arcpy.mapping.ExportToJPEG(mxd, outFile, df, df_export_width=3200, df_export_height=2300, resolution = 150, world_file=True)
3
  • 2
    What arcpy method are you using to export out the images? What happens if you increase the font size and increase the dpi?
    – artwork21
    Jul 1, 2016 at 10:29
  • @artwork21 : it seemed that playing with resolution and export width and height did it. Thanks!
    – Koen Ver
    Jul 1, 2016 at 11:54
  • Can you add a few more lines to your code snippet to show how you are creating your map document, data frame and layer objects, please? At the moment you have only shown a copy/paste from your code instead of presenting a code snippet that works up to the point where you are stuck.
    – PolyGeo
    Jul 1, 2016 at 22:23

1 Answer 1

1

Sometimes what you see on the screen does not translate to what it looks like when printed or exported. To evaluate font/label size, in layout view click the 1 to 1 button. As my comment suggested, try to increase the font size and/or dpi resolution within your export method to enhance the label visibility.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.