CTAN Comprehensive TeX Archive Network

Directory support/wmf2epsc

README
WMF2EPSC: A Windows Metafile Converter for Windows 8 and later
==============================================================

Version 2.2 [04-Aug-2023]

License
-------
This program package is freeware, it may be freely distributed as unchanged zip package.
The program wmf2epsc.exe is freeware, no source is available.
The program wmf2epsc.exe uses the Win32 API only, no additional libraries are included.
The programs and scripts in this package come without any warranty.

SHA256 Hash of wmf2epsc.exe: b754a062ec6d2a1fc7aefdb54c6620d90d531b87f5aa26dfc93cb7db07cbea19

Author
------
Wolfgang Schulter, wmf2eps@gmx.de, 	https://wschulter.de/wmf2epsc

The package wmf2epsc_2.2.zip contains
-------------------------------------
- wmf2epsc.exe, the binary CLI (command line version) using the WMF2EPS virtual printer.
- Test\ subdir with  WMF and EMF files.
- A cmd-script installer for the WMF2EPS.PPD virtual printer for Windows 8 and newer.
- A cmd script inksc_wmf2epsc.cmd for WMF|EMF conversion with Inkscape (inkscape.org).
- A cmd script inksc_wmf2pdfc.cmd for WMF|EMF conversion with Inkscape (inkscape.org).

Summary
=======
Main LaTeX distributions do not allow Windows WMF or EMF graphics format with \includegraphics.
WMF2EPSC is a package with the free Windows commandline program wmf2epsc.exe using the
WMF2EPS virtual printer, distributed as unsigned PostScript driver package.
However, administrators still can enforce installation of the unsigned PostScript driver.
With the WMF2EPS virtual printer installed, wmf2epsc.exe converts native Windows WMF 
(or EMF) format to EPS containing vector graphics (some test files are included).
Two additional command line scripts are included showing how the conversion can be done using
Inkscape, without the WMF2EPS virtual PostScript printer driver.

History
=======
The main free LaTeX distributions do not allow \includegraphics WMF or EMF graphics format
(BaKoMa-TeX distribution does support WMF, using libwmf, but it seems to be discontinued).
In order to provide vector graphics in the final output, for WMF (or EMF) vector graphics
an intermediate step with conversion of WMF|EMF to EPS or PDF format is needed.
Even the latest PDFLATEX version can use (WMF2EPS produced) EPS or PDF graphics. If needed,
the EPS can be converted to PDF with the correct bounding box using the epstopdf utility.
WMF2EPSC EXE is based on the 2002 WMF2EPS 1.32 GUI program (on CTAN), which is shareware.
**************************************************************************************************
If the installation of the WMF2EPS virtual printer driver is not possible or not wanted for any 
reason: Inkscape (9.3 or later) can do the WMF|EMF conversion to EPS|PDF (see Option 2 below).
**************************************************************************************************

Installation under Windows 10
=============================
Please make sure you have the original wmf2epsc_22.zip file (best from CTAN).

Unpack the archive to a writable folder, e.g.: d:\prog\wmf2epsc as WMF2EPSC dir.
wmf2epsc.exe will write a wmf2epsc.ini configuration file in this dir after the first run.

For EPS and PDF view, GhostScript and Sumatra PDF might be helpful.


Option 1 (with WMF2EPS virtual printer)
---------------------------------------
If you already used the WMF2EPS GUI version (latest 1.32 of 2002), or if you had previously 
installed SWP 5.x, you might have installed the 'WMF2EPS Color PS L2' virtual printer already, 
then, installation is finished.
The wmf2epsc.exe needs no further installation.

-------------------------------------------------------------------------------
If you want to install the 'WMF2EPS Color PS L2' virtual printer, be aware that the installation 
of WMF2EPS.PPD requires a driver signature since Windows 7, which is not available.
However, you can decide to install an "unsigned driver", (a PPD is just a config file):
- with UEFI boot, the 'Startup Options' need to be adjusted, see PSPrint\Win8\Readme.txt
- cd to <WMF2EPSC dir>\PSprint\Win8
- open cmd.exe as Administrator
- run install_WMF2EPS_vprint.cmd, following the Readme.txt inside. 
- after this, please check the existence and *especially* the correct EPS setting, 
  with the 'WMF2EPS Color PS L2' virtual printer.

With that, WMF2EPSC.EXE (and even the old WMF2EPS.EXE 1.32) should work fine.
-------------------------------------------------------------------------------

Usage: wmf2epsc.exe wmf[emf]-filename [eps-path]
------
1. Test the fant.wmf file in the Test\ subdirectory. In WMF2EPSC dir:
> wmf2epsc.exe Test\fant.wmf
produces the output
WMF2EPSC 2.2 (Freeware) [02-Aug-2023]
converting 'test\fant.wmf' ...
finished 'test\fant.eps'
EPS file OK

1a. If 'embedded' PDF is needed, epstopdf.exe from TeXLive distribution can be used:
> epstopdf test\fant.eps
to produce Test\fant.pdf with a tight bounding box.

2. Convert all EMF files in the Test\ subdirectory:
> wmf2epsc.exe Test\*.emf
produces: Test\image305.eps, Test\spc_color.eps and Test\spc_gray.eps

3. Convert all EMF files in the Test\ subdirectory into a separate subdirectory:
> wmf2epsc.exe Test\*.emf Test\eps\
produces: Test\eps\image305.eps, Test\eps\spc_color.eps and Test\eps\spc_gray.eps

4. Convert all EPS files in the Test\ subdirectory to PDF using the external epstopdf.exe,
which is part of the TeXLive distribution, it is assumed to be in the call-path:
- edit wmf2epsc.ini, set EPSPostProcCmd=epstopdf.exe
> wmf2epsc.exe Test\*.emf Test\eps\
produces: Test\eps\image305.pdf, Test\eps\spc_color.pdf and Test\eps\spc_gray.pdf
- edit wmf2epsc.ini, set EPSPostProcCmd=
to remove the EPS post processing, this is the default.

Option 2 (with Inkscape, without WMF2EPS virtual printer)
---------------------------------------------------------
Install the latest version of Inkscape, a free, open source vector graphics editor from
inkscape.org

In the WMF2EPSC dir, two command scripts are found:
- inksc_wmf2epsc.cmd for WMF|EMF to EPS conversion with Inkscape.
- inksc_wmf2pdfc.cmd for WMF|EMF to EPS conversion with Inkscape.

Usage: inksc_wmf2epsc.cmd <wmf|emf-filespec> [dir-spec]
       inksc_wmf2pdfc.cmd <wmf|emf-filespec> [dir-spec]
-------------------------
1. Test the fant.wmf file in the Test\ subdirectory. In WMF2EPSC\Test dir:
> ..\inksc_wmf2epsc.cmd fant.wmf eps 
produces the output .\eps\fant.wmf.eps

> ..\inksc_wmf2pdfc.cmd fant.wmf pdf 
produces the output .\pdf\fant.wmf.pdf

2. Convert all EMF files in the Test\ subdirectory:
> ..\inksc_wmf2epsc.cmd *.emf eps
produces: .\eps\image305.emf.eps, .\eps\spc_color.emf.eps and .\eps\spc_gray.emf.eps
> ..\inksc_wmf2pdfc.cmd *.emf pdf
produces: .\pdf\image305.emf.pdf, .\pdf\spc_color.emf.pdf and .\pdf\spc_gray.emf.pdf
---
Note: spc_color.emf and spc_gray.emf contain embedded bitmaps, here not converted
  by both commandline scripts, but in the Inkscape GUI it works fine with setting 
	the Inkscape option in the menu: View->Display Mode->Normal
	If anyone knows a fix (some commandline option ?), please let me know.

end.

Download the contents of this package in one zip archive (156.6k).

wmf2epsc – Windows metafile conversion

A Win32 program to convert MS-Windows Metafile Graphics (WMF) containing either vector-images or bitmaps into Encapsulated PostScript format having tight bounding-boxes at exactly the same size as the WMF-originals.

This is an update of the program wmf2eps that runs on Windows 8 and later.

Packagewmf2epsc
Home pagehttps://wschulter.de/wmf2epsc/
Version2.2
LicensesNo Source Available
MaintainerWolfgang Schulter
TopicsGraphics prep
...
Guest Book Sitemap Contact Contact Author