Amy Pearson Amy is a Java developer and member of the support team. Her main technical interests are JavaFX and Cloud. Out of hours she enjoys gaming and Virtual reality.

How to convert WMF files to SVG in java with JDeli

1 min read

This article will show you how to convert WMF files into SVG files using our JDeli Java Image library.

What is WMF?

WMFWMF is a file format designed for the Windows platform by Microsoft. WMF stands for Windows MetaFile and it is a Vector file format, meaning it scales well if you need to resize. You can learn more about them in our post “What are the WMF and EMF image file formats?”.

The file name extension for WMF files is: .wmf

Why convert WMF files to SVG

The WMF file format has been around for quite some time. As a result many Companies have lots of WMF files. However outside of the Windows world the WMF format is not heavily supported. SVG is also a Vector file format so converted content keeps the benefits of being rescaled easily. In contrast to WMF, SVG is a very popular cross-platform format that is supported by all modern Browsers and many tools on Windows, Mac, and Linux.

How to convert WMF file to SVG in JDeli

Step 1 Add JDeli to your class or module path. (download link to the trial jar).

Step 2 Create a File (or InputStream) object for the WMF file

File wmfFile = new File("/path/to/wmfFile.wmf"));

Step 3 Create a File (or OutputStream) object for the converted SVG output

File svgFile = new File("/path/to/svgFile.svg"));

Step 4 Pass the File (or OutputStream) objects into a static method

WmfDecoder.toSVG(wmfFile,svgFile);

Why use JDeli to convert WMF to SVG?

JDeli offers a range of advantages over ImageIO and alternatives, including:

  • Use existing WMF content on a wide range of new platforms and applications
  • Retain Vector format
  • Reduce output file size
  • Support for Converting WMF to Image as well

Learn more about JDeli, or download to try it yourself.

Did you know...

IDRsolutions offers a whole range of online file converters to convert PDF and Microsoft Excel, Word and Office Documents to HTML5, SVG or image formats?

It is free to use for single file conversions and also includes Developer links if you want to use our commercial software for bulk conversions. Find out more on this page

Amy Pearson Amy is a Java developer and member of the support team. Her main technical interests are JavaFX and Cloud. Out of hours she enjoys gaming and Virtual reality.

How to read HEIC image files in Java with…

In this article, I will explain how to read HEIC files into Java as a BufferedImage. ImageIO does not read HEIC file types so...
Mark Stephens
1 min read

How to write WebP images in Java

In this article, I will walk you through how to write out images as WebP images in Java. ImageIO does not support WebP images...
Mark Stephens
1 min read

How to convert EMF files to SVG in Java…

This article shows you how to convert EMF files into SVG files using our JDeli Java Image library. What is EMF? EMF is a...
Mark Stephens
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2020. All rights reserved.