Converting from PostScript to EWM (Enhanced Windows Metafile) using pstoedit (2004/12/06)


On UNIX systems, the most widely-used file format for vector-based graphics is Adobe's PostScript format and its extension called EPS (Encapsulated PostScript). Almost all graphic applications running on UNIX systems can generate in PostSciprt format. PostSciprt files are very handy on UNIX systems, but it is sometimes nasty to handle these files on Microsoft Windows. In what follows, I will explain how PostSciprt files (and equivalently, EPS files) can be converted to EWM (Enhanced Windows Metafile).

1. Install libEMF ( and pstoedit (

I recommend to use pstoedit for converting from PostSciprt to EWM (Enhanced Windows Metafile). Note that libEMF must be installed before installig pstoedit. After compilation and installation of pstoedit, make sure that the emf driver has been successfully compiled in.

  % pstoedit -f ?
  pstoedit: version 3.33 / DLL interface 108 (build Jun 17 2004 - release build) : Copyright (C) 1993 - 2003 Wolfgang Glunz
  Unsupported driver ?
  Available formats :
          psf:            Flattened PostScript (no curves)        (built-in)
          ps:             Simplified PostScript with curves       (built-in)
          debug:          for test purposes       (built-in)
          dump:           for test purposes (same as debug)       (built-in)
          gs:             any device that GhostScript provides - use gs:format, e.g. gs:pdfwrite  (built-in)
          ps2ai:          Adobe Illustrator via of GhostScript   (built-in)
          sample:         sample driver: if you don't want to see this, uncomment the corresponding line in makefile and make again       (/usr/local/lib/pstoedit/
          idraw:          Interviews draw format (EPS)    (/usr/local/lib/pstoedit/
          fig:            .fig format for xfig    (/usr/local/lib/pstoedit/
          xfig:           .fig format for xfig    (/usr/local/lib/pstoedit/
          tgif:           Tgif .obj format (for tgif version >= 3)        (/usr/local/lib/pstoedit/
          gnuplot:        gnuplot format  (/usr/local/lib/pstoedit/
          tk:             tk and/or tk applet source code         (/usr/local/lib/pstoedit/
          hpgl:           HPGL code       (/usr/local/lib/pstoedit/
          pic:            PIC format for troff     (/usr/local/lib/pstoedit/
          latex2e:        LaTeX2e picture format  (/usr/local/lib/pstoedit/
          mma:            Mathematica Graphics    (/usr/local/lib/pstoedit/
          mpost:          MetaPost Format         (/usr/local/lib/pstoedit/
          sk:             Sketch Format   (/usr/local/lib/pstoedit/
          text:           text in different forms         (/usr/local/lib/pstoedit/
          kil:            .kil format for Kontour         (/usr/local/lib/pstoedit/
          pdf:            Adobe's Portable Document Format        (/usr/local/lib/pstoedit/
          java2:          java 2 source code      (/usr/local/lib/pstoedit/
          java1:          java 1 applet source code       (/usr/local/lib/pstoedit/
          dxf:            CAD exchange format     (/usr/local/lib/pstoedit/
          dxf_s:          CAD exchange format with splines        (/usr/local/lib/pstoedit/
          rpl:            Real3D Programming Language Format      (/usr/local/lib/pstoedit/
          rib:            RenderMan Interface Bytestream  (/usr/local/lib/pstoedit/
          lwo:            LightWave 3D Object Format      (/usr/local/lib/pstoedit/
          wmf:            Windows metafile        (/usr/local/lib/pstoedit/
          emf:            Enhanced Windows metafile       (/usr/local/lib/pstoedit/
2. Convert from PostSciprt file to Enhanced Windows Metafile
  $ pstoedit -f emf file.wmf

If the PostSciprt file has more than a single page, you have to specify '%d' in the output filename, e.g.,

  $ pstoedit -f emf file%d.wmf

Also, you can convert from EPS (Encapsulated PostSciprt) to EWM (Enhanced Windows Metafile).

  $ pstoedit -f emf file.eps file.wmf
3. Insert the generated EWM file into your Windows' application


Hey! The above document had some coding errors, which are explained below:

Around line 17:

=over without closing =back

Hiroyuki Ohsaki (ohsaki[atmark]