Knowledge Base - Technical Articles


Technical Article   Error:  Cannot map metafile into memory. Not enough memory

Article ID: 20294
Software:  ArcGIS - ArcEditor 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 8.0.1, 8.0.2, 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcView 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS for Desktop Advanced 10.1 ArcGIS for Desktop Standard 10.1 ArcGIS for Desktop Basic 10.1
Platforms: N/A

Error Message

When exporting or printing a large map, the following error message is displayed:

"Cannot map metafile into memory. Not enough memory"

This prevents the output file from being created and deletes the interim Enhanced Windows Metafile Format (EMF) file.

Cause

When ArcMap prints or exports to any format, a series of 100 MB EMF files are created. Windows attempts to allocate enough memory to read each 100 MB size EMF metafile. If it cannot allocate a large enough contiguous block of memory, Windows returns a NULL or '0' EMF handle, and ArcMap displays the error message.

Memory in Windows is a combination of physical RAM and disk paging files. Memory is allocated when an application is launched, and it is released when that application is shutdown. Continuous use of applications causes fragmentation of memory and reduces the size of the largest contiguous block. Memory is slowly defragmented when the machine is allowed to sit idle, such as, no processing or mouse movements.

An E-size map with raster elements, either raster data or rasterized vector objects, such as those having transparent or picture fill/marker symbology, can easily reach total temp file sizes of 2 to 4 GB. The interm EMF file used to store 2 GB of draw commands is represented as a chain of twenty 100 MB files on disk.

When creating a map of this size or larger, Windows must find at least 100 MB of contiguous (perfectly unfragmented) memory or it returns a NULL handle, and the error is triggered. Because any application or service running on the machine can fragment memory, perfectly contiguous 100 MB memory blocks become scarce after even moderate use. Preserving contiguous memory is difficult even on machines with large amounts of RAM (2048 MB and up), and plenty of disk space for the page file (4 GB and up).

Solution or Workaround

Use the following workarounds to eliminate this problem:

  • Change the output size limit setting in the registry to generate smaller temporary metafile (EMF) draw files. -show me-

    Summary
    Instructions provided describe how to change the size of the output temporary metafile Enhanced Windows Metafile Format (EMF) that is generated. The default value and the value used when this registry entry is absent is hex 6400000 (decimal 104,857,600). To force ArcMap to create smaller temporary files, create a registry entry containing a value lower than decimal 104857600. Decimal 32000000 is a good alternative.

    Smaller temporary metafile sizes can alleviate "Cannot map metafile into memory. Not enough memory" errors experienced during printing or exporting in ArcGIS.


     The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary. ESRI cannot guarantee results from incorrect modifications while following these instructions; therefore, use caution and proceed at your own risk.


     The following procedure alters the printing and export behavior of ArcMap and other ArcGIS applications, and should only be performed by advanced users. Take caution when setting the values described here, since incorrect values for these settings can cause all printing and exporting from ArcMap to fail.

    Procedure
    To force ArcGIS to create smaller temporary files, change the output temporary file size setting to a lower value:

    1. Close ArcMap.
    2. Navigate to Start > Run, type regedit and click OK.
    3. Expand HKEY_CURRENT_USER\Software\ESRI\Display.
    4. Navigate to Edit > New > DWORD Value.
    5. Enter 'OutputSizeLimit' without quotes as the key name and press Enter.
    6. Double-click OutputSizeLimit to enter a Data value.
    7. Click the Decimal radio button in Base and enter the following value: 32000000.
    8. Click OK; the Data value is displayed as '0x01e84800 (32000000)' without quotes.



      [O-Image] OutputSizeLimitRegEditScreen32MB
    9. Close the Registry Editor.
    10. Restart ArcMap or any other ArcGIS application.

  • Simplify and generalize the map data. Try to reduce the usage of raster data. Use the clip tools in ArcToolbox to generate new data that focuses on just the data required for the layout.
  • Reduce the display quality of all raster layers. -show me-

    1. Right-click the raster layer in the Table of Contents and select Properties.
    2. In the Layer Properties dialog box, select the Display tab.
    3. Lower the display quality in the Display Quality slider from Normal.
    4. Click OK.
    [O-Image] Raster Display Quality
  • Increase the virtual memory to the maximum usable by the Windows operating system. See the corresponding link in the Related Information section below.
  • Restart the computer and, without running any other applications, immediately open and export the MXD document. Restarting releases memory allocations, and this may help export or print the map successfully.
  • Discontinue using highly-compressed raster formats such as MrSID or ECW, which must be completely uncompressed during the output process and can consume a lot of computer resources, including paging file. See the corresponding link in the Related Information section below for more information.
  • Remove layers symbolized with transparency or BMP/picture marker symbology from group layers that are turned on and currently being displayed.
  • Eliminate transparencies, picture fill symbols, and picture marker symbols from the map. This reduces the amount of raster data in the output. -show me-
    Description
    Maps printed or exported from ArcMap are bitmapped, scattered, banded, or display with low quality.
    Cause
    This happens for several reasons, independently or combined:

    • The maps are printed or exported with either a low output resolution or a low Output Image Quality (OIQ) setting.

    • The map uses a picture/bitmap fill, picture marker, and/or transparent symbology.

    When exported or printed, ArcMap flattens and rasterizes the layer that is symbolized with either a picture fill, picture marker or transparency, and any layers beneath it in the table of contents (TOC).

    Other data frames in the map that do not contain picture fills, picture markers, or transparency are not effected.
    Solution or Workaround
    • Increase the output resolution.
      -show me-
    • Increase the Output Image Quality (OIQ) setting.
      -show me-
    • Reorder the map elements and layers to have layers containing picture fill, picture marker, or transparent symbols at the lowest possible order in the table of contents.
    • Replace the Picture Fill symbols with simpler, vector fills.
    • Replace the Picture Marker symbols with font-based vector marker symbols.
    • Remove transparency. For exported maps, transparency can be re-applied to the desired elements in an external editing application, such as Adobe Illustrator 9.
    • Cannot map metafile into memory. Not enough memory
      When exporting or printing a large map, the following error message is displayed: "Cannot map metafile into memory. Not enough memory" This prevents the output file from being created and deletes the interim Enhanced Windows Metafile Format ...
    • Modify output resolution (dpi) for ArcMap printing or exporting
      Instructions provided describe how to modify the dots per inch (dpi) or output resolution from ArcMap default when printing or exporting at a higher or lower resolution.
    • Use the Output Image Quality option
      The Output Image Quality (OIQ) option allows the amount of raster resampling that occurs when a map is printed or exported to be controlled. This resampling affects any raster data, transparent map layers, and picture fill symbols. Increasin...


Related Information


Created: 8/15/2001
Last Modified: 3/7/2013

Article Rating: (7)
If you would like to post a comment, please login

Comments

By gonzaloavf - 02/16/2012 5:29 AM

The article is incorrect or the solution didn’t work.

A brief classification of the workarounds: *Change the output size limit ... - it did not work; *Simplify and generalize the map data ... First, my map did not have any raster, only pictures on it, on an already very poor resolution, second, what´s the use of it if I am working on arcserver services for data providing? *Reduce display quality ... read obs above *Increase virtual memory ... did not work *Restart the computer ... this is like the joke everybody knows on the four friends (a mechanic, a chemist, an electrician and a IT pro) that had a problem in their car and the first three tried solution in their fields which had no effect until finally the IT pro called them to get out of the car and go in again and then the car started running again. *Discontinue using high compressed ... this is not my case, none raster *Remove layers ... I do not have them and what´s the use of such resource if you cannot use it? *Eliminate transparencies bla bla bla ... read above. Finally, I did not have this caveat on printing on my previous machine with a quarter of the RAM I have now with one processor only, on 32b, the same AGis license. My hardware uprade(now a Dell Optiplex 790) side kicked a downgrade on my software. "There is no political solution to our troubled evolution" I see odd spirits in the machinery world odd spirits. As to the author of the article, he did his best. Jeopardy is on ESRI and DELL and Microsoft all together.

Rating:

By kopeaus - 01/25/2012 10:00 AM

The article needs to be updated.

In step one is 6400000 a typo? Shouldn't it be 6400000? Also the location of the registry key has changed in ArcGIS 10.

Rating:

By Anonymous - 12/11/2010 8:32 AM

The article needs to be updated.

Some changes took place with the company's server. This caused the prints to become unable to plot or exported in *.pdf format. Once I made these changes, the plotting ability was restored. Thanks for the article.

Rating:

By Anonymous - 11/26/2009 6:35 AM

Great article! It helped a lot!

With the article I solved a problem, that I had for more than a few month. Best regards and thanks to the author Andreas

Rating:

By Anonymous - 08/05/2008 3:34 PM

Other - See details below.

Other solution is to make the symbolize layer a raster by adding a 1% transparent in the layer properties > display. Try printing it should work.

Rating:

By Anonymous - 02/08/2007 5:00 AM

Other - See details below.

Can someone tell me when ESRI will fix this problem? This has been a problem since 8.1 and still exists in 9.1. (3.2 didn't have this problem) I've emailed this problem a number of time to my local ESRI support over the last 2 years and still it has not been resolved. Plotting layouts with raster data at sizes greator than A0 is a hit and miss. This is now a well known issue in our industry and forcing our company to look at alternative GIS software to over come this.

Rating:

By Anonymous - 08/30/2006 3:28 PM

The article needs to be updated.

This is a start that at least discusses the bug. None of these suggestions solved the problem, especially trying to export a map book. I tried half a page, removed lots of layers, turned off hill shading and contours. Then I didn't have a map! Will the vectorise fill symbols in 9.2 help? How can I assess how many emf objects I am creating? What would real people do?? Use another mapping package?

Rating:

By Anonymous - 03/13/2003 1:06 AM

It still doesn't answer part of my initial question which was "Why do we have these problems with ArcView 8.2 when an earlier version of your software ie ArcView 3.2a can print the same imagery??