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)
Hornbydd
44.9k5 gold badges42 silver badges84 bronze badges
asked Jul 1, 2016 at 10:15
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? Commented Jul 1, 2016 at 10:29
  • @artwork21 : it seemed that playing with resolution and export width and height did it. Thanks! Commented 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. Commented 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.

answered Jul 1, 2016 at 22:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.