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

[Japanese]

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 (http://libemf.sourceforge.net/) and pstoedit (http://www.pstoedit.net/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 ps2ai.ps 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/libp2edrvstd.so)
          idraw:          Interviews draw format (EPS)    (/usr/local/lib/pstoedit/libp2edrvstd.so)
          fig:            .fig format for xfig    (/usr/local/lib/pstoedit/libp2edrvstd.so)
          xfig:           .fig format for xfig    (/usr/local/lib/pstoedit/libp2edrvstd.so)
          tgif:           Tgif .obj format (for tgif version >= 3)        (/usr/local/lib/pstoedit/libp2edrvstd.so)
          gnuplot:        gnuplot format  (/usr/local/lib/pstoedit/libp2edrvstd.so)
          tk:             tk and/or tk applet source code         (/usr/local/lib/pstoedit/libp2edrvstd.so)
          hpgl:           HPGL code       (/usr/local/lib/pstoedit/libp2edrvstd.so)
          pic:            PIC format for troff et.al.     (/usr/local/lib/pstoedit/libp2edrvstd.so)
          latex2e:        LaTeX2e picture format  (/usr/local/lib/pstoedit/libp2edrvstd.so)
          mma:            Mathematica Graphics    (/usr/local/lib/pstoedit/libp2edrvstd.so)
          mpost:          MetaPost Format         (/usr/local/lib/pstoedit/libp2edrvstd.so)
          sk:             Sketch Format   (/usr/local/lib/pstoedit/libp2edrvstd.so)
          text:           text in different forms         (/usr/local/lib/pstoedit/libp2edrvstd.so)
          kil:            .kil format for Kontour         (/usr/local/lib/pstoedit/libp2edrvstd.so)
          pdf:            Adobe's Portable Document Format        (/usr/local/lib/pstoedit/libp2edrvstd.so)
          java2:          java 2 source code      (/usr/local/lib/pstoedit/libp2edrvstd.so)
          java1:          java 1 applet source code       (/usr/local/lib/pstoedit/libp2edrvstd.so)
          dxf:            CAD exchange format     (/usr/local/lib/pstoedit/libp2edrvstd.so)
          dxf_s:          CAD exchange format with splines        (/usr/local/lib/pstoedit/libp2edrvstd.so)
          rpl:            Real3D Programming Language Format      (/usr/local/lib/pstoedit/libp2edrvstd.so)
          rib:            RenderMan Interface Bytestream  (/usr/local/lib/pstoedit/libp2edrvstd.so)
          lwo:            LightWave 3D Object Format      (/usr/local/lib/pstoedit/libp2edrvstd.so)
          wmf:            Windows metafile        (/usr/local/lib/pstoedit/libp2edrvwmf.so)
          emf:            Enhanced Windows metafile       (/usr/local/lib/pstoedit/libp2edrvwmf.so)
2. Convert from PostSciprt file to Enhanced Windows Metafile
  $ pstoedit -f emf file.ps 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.ps 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

POD ERRORS

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

Around line 17:

=over without closing =back


Hiroyuki Ohsaki (ohsaki[atmark]lsnl.jp)