Windows EMF to CGM SDK

Quickly implement a high quality ISO CGM file output from Windows Applications.

The task of writing CGM from a Windows application is not a trivial, considering the time required to learn the CGM format. Our EMF to CGM SDK makes this task simple.

To get started, you need a target application to capture your application's drawing command (GDI objects) to an Enhanced Windows Metafile, then our EMF to CGM Converter will efficiently convert Windows GDI objects such as arc, polygon, polyline, textout, polybezier and stretchblt directly to their CGM equivalents.

Example Code (C++):

#include "emf2cgm"

CMetaFileDC aEmfDC;
CClientDC aRefDC(this);
if ( !(aEmfDC.CreateEnhanced(&aRefDC, "sample.emf", NULL, NULL)) )
    return; // Unable to Create Temporary Emf File
aEmfDC.m_hAttribDC = aRefDC.GetSafeHdc();
CRect rect;
OnDraw(&aEmfDC, &rect, &rect);

if ( !(hEmf = aEmfDC.CloseEnhanced()) )
    return; // error writing EMF


if (Emf2Cgm("sample.emf","sample.cgm", TRUE, FALSE, PIP, FALSE))
    return; // error converting to CGM

EMF to CGM Converter is available as a DLL or static library compatible with MS Visual C++, Borland C++, Visual Basic and other development environments.