Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to export some MXD maps to PDF with arcpy (ArcGIS 10.1). Everything works fine and dandy except for ECW images, which don't appear in the PDF. However, when I execute the same code from the ArcGIS python console, the ECW is exported. So if I execute this from an external script:

import arcpy
mxd = arcpy.mapping.MapDocument("path\\to\\test.mxd")
arcpy.mapping.ExportToPDF(mxd, "path\\to\\test.pdf")

I don't get the ECW layer in the PDF. But if I execute the same lines in the console, it works and the ECW layer is exported properly. Also, if I run


from the ArcGIS console, I also get the ECW in the PDF. I don't have this problem with other image formats, like JPG.

What's going on here? What's different between the environments? How can I debug this?

share|improve this question

I found this document which I think explains what you are seeing.

All MrSID and ECW images in an ArcMap map must be completely uncompressed before being processed by the output pipeline. Since these raster formats can be compressed at a 1:10 - 1:50 ratio, this can result in several gigabytes or more of temporary files. This can exceed the available resources of ArcGIS and the Windows operating system and result in clipped or missing output, application failures, and crashes.

share|improve this answer
Thanks, I suspected it was a memory issue. This is good for explaining, but I still don't understand why it happens externally but not within ArcGIS. – bananafish Apr 17 '13 at 1:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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