Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

How to convert EMF files to SVG in Java with JDeli

1 min read

EMF icon

This article shows you how to convert EMF files into SVG files using our JDeli Java Image library.

What is EMF?

EMF iconEMF is a file format invented by Microsoft for the Windows platform. It is a Vector file format, which means it scales nicely if you need to resize. You can learn more about them in our post “What are the WMT and EMF image file formats?”.

The file name extension for EMF files is: .emf

Why convert EMF files to SVG

The EMF file format has been around for a long time so many Companies have a big investment in EMF files. And the EMF format is not heavily supported outside the Windows world. SVG is a very popular cross-platform format that is supported by all modern Browsers and many tools on Windows, Mac, and Linux. It is also a Vector format so converted content retains the benefits of being easily rescaled.

How to convert EMF 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 EMF file

File emfFile = new File("/path/to/emfFile.emf"));

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

EmfDecoder.toSVG(emfFile,svgFile);

Why use JDeli to convert EMF to SVG?

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

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

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



Tired of bad quality image libraries?

Write and Read Images in Java Find out why our customers trust JDeli with reading/writing images in Java

Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Leave a Reply

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

IDRsolutions Ltd 2021. All rights reserved.