View and Convert EMF files

View and Convert EMF files in Java

GroupDocs.Viewer for Java (which is a part of Conholdate.Total for Java) provides facility to view and convert EMF or EMZ files.

EMF or EMZ are Windows Compressed Enhanced Metafile graphics formats developed by Microsoft. These formats may contain both vector and raster images, but they are primarily used for vector images.

EMF or EMZ is Enhanced Windows Metafile Format - it contains Windows MetaFile binary data.

If you need to view an EMF(EMZ) file in a browser or a standard image or PDF viewer application, you can convert it to HTML, JPEG, PNG PDF format with GroupDocs.Viewer for Java.

EMF or EMZ

How to convert EMZ files

Convert EMZ to HTML

To convert EMZ files to HTML with GroupDocs.Viewer for Java use following code:

    try (Viewer viewer = new Viewer("sample.emz")) {
        HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("output.html");

        viewer.view(options);
    }


The following screenshot shows the output HTML file opened in a browser.

EMF/EMZ in HTML

Convert EMZ to JPG

To convert EMZ files to JPG with GroupDocs.Viewer for Java use following code:

    try (Viewer viewer = new Viewer("sample.emz")) {
        JpgViewOptions options = new JpgViewOptions("output.jpg");

        viewer.view(options);
    }


The following screenshot shows the output JPG file opened in a Windows Photo Viewer application.

EMF/EMZ in JPG

Convert EMZ to PNG

To convert PLT/HPG files to PNG with GroupDocs.Viewer for Java use following code:

    try (Viewer viewer = new Viewer("sample.emz")) {
        PngViewOptions options = new PngViewOptions("output.png");

        viewer.view(options);
    }


The following screenshot shows the output PNG file opened in a Windows Photo Viewer application.

EMF/EMZ in PNG

Convert EMZ to PDF

To convert EMZ files to PDF with GroupDocs.Viewer for Java use following code:

    try (Viewer viewer = new Viewer("sample.emz")) {
        PdfViewOptions options = new PdfViewOptions("output.pdf");

        viewer.view(options);
    }


The following screenshot shows the output PDF file opened in an Acrobat Reader.

EMF/EMZ in PDF