A portable library for reading and writing WMF, EMF and EMF+ files
Microsoft's WMF, EMF, and EMF+ metafile types are supported. In each case functions are provided for reading, constructing, writing, and printing metafile records. The methods used to do that differ somewhat between metafiles, and the simplest way to get started is to have a look at the example programs provided. The WMF, EMF, and EMF+ structs and functions are marked with U_WMF, U_EMF, U_PMF and U_WMR, U_EMR, and U_PMR prefixes. (PMF because "+" is a reserved character in many contexts, so U_EMF+NAME would be a problem.) Please be aware that normally both EMF and EMF+ files have the ".emf" file extension, and that it is very common for such files to contain both an EMF and an EMF+ representation of the drawing.
testbed_emf.c Creates an EMF file test_libuemf.emf.
testbed_wmf.c Creates a WMF file test_libuemf.wmf.
testbed_pmf.c Creates an EMF+ file test_libuemf_p.emf.
reademf.c Reads an EMF or EMF+ file and emits a text summary of its records.
readwmf.c Reads a WMF file and emits a text summary of its records.
emf-inout.cpp.example Example code from Inkscape to convert graphics from EMF to SVG.
emf-print.cpp.example Example code from Inkscape to print a drawing to EMF.
wmf-inout.cpp.example Example code from Inkscape to convert graphics from WMF to SVG.
wmf-print.cpp.example Example code from Inkscape to print a drawing to WMF.
There are currently some unresolved issues with Doxygen that result in some structs not being "defined". This comes up when several different types of structs have the same layout. When this occurs the first one listed on the "typedef struct" is defined but all the others will only be shown under "typedef struct" referring to the first one. This is why clicking on U_RECTL in a function parameter jumps to a typedef struct page, why U_RECTL is shown as plain text here, but U_RECT is shown as a link here, and clicking on it jumps directly to its structure definition.
An additional issue is that the Enumeration names used in WMF are different from those used in EMF, even when the values are either identical or differ only slightly, and no method has been found yet to link one to the other in Doxygen. At present the only way to look up these WMF enumerations is by referencing the following table:
EMF WMF WMF Manual EMF Binary Raster Operation Enumeration BinaryRasterOperation Enumeration 22.214.171.124 EMF Bitcount Enumeration BitCount Enumeration 126.96.36.199 EMF LB_Style Enumeration BrushStyle Enumeration 188.8.131.52 EMF LF_CharSet Enumeration CharacterSet Enumeration 184.108.40.206 EMF DIBColors Enumeration ColorUsage Enumeration [has 1 extra value] 220.127.116.11 EMF BI_Compression Enumeration Compression Enumeration [has 3 extra values] 18.104.22.168 - FamilyFont Enumeration 22.214.171.124 EMF FloodFill Enumeration FloodFill Enumeration 126.96.36.199 EMF LF_Quality Enumeration FontQuality Enumeration 188.8.131.52 EMF LCS_Intent Enumeration GamutMappingIntent Enumeration 184.108.40.206 EMF HatchStyle Enumeration HatchStyle Enumeration 220.127.116.11 EMF Mirroring Enumeration LayoutEnumeration 18.104.22.168 - LogicalColorSpace Enumeration 22.214.171.124 EMF Profile Enumeration LogicalColorSpaceV5 Enumeration 126.96.36.199 EMF MapMode Enumeration MapModeEnumeration 188.8.131.52 - MetaFilesEscape Enumeration 184.108.40.206 - MetafileType Enumeration 220.127.116.11 - MetafileVersion Enumeration 18.104.22.168 EMF BackgroundMode Enumeration MixModeEnumeration 22.214.171.124 EMF LF_OutPrecision Enumeration OutPrecision Enumeration 126.96.36.199 - PaletteEntryFlag Enumeration 188.8.131.52 EMF PenStyle Enumeration PenStyle Enumeration [not values >0xFFFF] 184.108.40.206 - PitchFont Enumeration 220.127.116.11 EMF PolygonFillMode Enumeration PolyFillMode Enumeration [first 2 only] 18.104.22.168 - PostScriptCap Enumeration 22.214.171.124 - PostScriptClipping Enumeration 126.96.36.199 - PostFeatureSetting Enumeration 188.8.131.52 - PostScrioptJoin Enumeration 184.108.40.206 EMF StretchMode Enumeration StretchMode Enumeration 220.127.116.11 EMF Ternary Raster Operation Enumeration TernaryRasterOperation Enumeration 18.104.22.168 EMF LF_ClipPrecision Enumeration ClipPrecision Flags 22.214.171.124 EMF ExtTextOutOptions Enumeration ExtTextOutOptions Flags [subset] 126.96.36.199 EMF TextAlignment Enumeration TextAlignment Enumeration 188.8.131.52 EMF TextAlignment Enumeration VertialTextAlignment Enumeration 184.108.40.206 EMF LF_PitchAndFamily Enumeration PitchAndFamily Enumerations 220.127.116.11
Manual Date Link EMF 3/28/2012 http://msdn2.microsoft.com/en-us/library/cc230514.aspx EMF+ 7/5/2012 http://msdn.microsoft.com/en-us/library/cc230724.aspx WMF 7/5/2012 http://msdn2.microsoft.com/en-us/library/cc250370.aspx