Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Graph export: "Could not initialize metafile"

From   Dorothy Bridges <>
Subject   Re: st: Graph export: "Could not initialize metafile"
Date   Fri, 23 Apr 2010 10:18:56 -0400

Apologies for the delay in responding -- I just wanted to note that
the default printer driver was indeed the issue.  Problem solved.


On Wed, Apr 21, 2010 at 7:01 PM, Dorothy Bridges <> wrote:
> Thanks, Alan!  I will check and get back to you.
> On Wed, Apr 21, 2010 at 5:53 PM, Alan Riley <> wrote:
>> Dorothy Bridges ( reports that a colleague is
>> seeing an error when they try to export a graph as an EMF file:
>>> My .do file includes a command along the lines of: "graph export
>>> mygraph.emf".  The file runs fine on my computer and on the computers
>>> of at least two of my colleagues.  On a third colleague's computer,
>>> however, we get the error message "could not initialize metafile."
>>> This guy has the same version of Stata and the same version of Windows
>>> as the rest of us.  He is able to export to .wmf without trouble.  Any
>>> ideas?
>> There are two cases in which Stata will report this error message
>> when trying to export an EMF file:
>>   1) There is no default printer driver installed on the Windows system,
>>      or the default printer driver has a bug or is refusing to load.
>>   2) Windows refused to initialize the EMF file.  This is very
>>      unlikely and would likely only arise in the event of a corrupt
>>      version of Windows.  We have never seen an instance of a user
>>      encountering this.
>> #1 is the most likely reason.  Applications must create EMF files
>> with respect to some device on the Windows system so that things
>> like fonts and text and line spacing can be calculated with respect
>> to a standard resolution.  Stata and most other applications which
>> support EMF files use the default printer as the reference device.
>> Dorothy's colleague should ensure they have a default printer driver
>> installed, even if a printer is not connected to their computer.
>> If they already have such a printer driver installed, and are still
>> receiving this error message, it can indicate a bug or error within
>> the printer driver itself, and rebooting the computer can sometimes
>> clear such an error.
>> If Dorothy's colleague is unable to resolve the problem, they should
>> contact Stata Technical Services at, who will
>> help them diagnose and correct the problem.
>> Alan
>> *
>> *   For searches and help try:
>> *
>> *
>> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index