Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

execfile('export_mxd_to_pdf.py')

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.