EMF, EMF+ and WMF
Reads Enhanced Metafiles, including embedded EMF+ (GDI+) records, and 16-bit Windows Metafiles. The format is detected from the file contents.
A TypeScript library with no runtime dependencies. Runs in the browser, in Web Workers and in Node.js.
Select or drop an .emf or .wmf file. The file is converted in your browser and is not uploaded anywhere.
import {
convertMetafileToDataUrl,
convertMetafileToJpegDataUrl,
convertMetafileToPdf,
convertMetafileToSvg,
convertMetafileToWebpDataUrl,
} from 'emf-converter';
const buffer: ArrayBuffer = await file.arrayBuffer();
const png = await convertMetafileToDataUrl(buffer); // "data:image/png;base64,..."
const jpeg = await convertMetafileToJpegDataUrl(buffer); // "data:image/jpeg;base64,..."
const webp = await convertMetafileToWebpDataUrl(buffer); // "data:image/webp;base64,..."
const svg = await convertMetafileToSvg(buffer); // "<svg ...>...</svg>"
const pdf = await convertMetafileToPdf(buffer); // Uint8Array of a PDF fileSee Getting started for installation and Usage for more examples.