Placeable Metafile Format

To be directly placed in PageMaker, a Windows GDI metafile must contain this header at the beginning of the metafile:

            DWORD                     key;

            HANDLE                   hmf;

            RECT                          bbox;

            WORD                        inch;

            DWORD                     reserved;

            WORD                        checksum;

            char                             metafileData[];

where:

            key                              Binary key that uniquely identifies this file type.this must be 0x9AC6CDD7L.

            hmf                             Unused; must be zero

            bbox                            The coordinates of a rectangle that tightly bounds the picture. These coordinates are in metafile units defined below.

            inch                             The number of the metafile units to the inch. To avoid numeric overflow in PageMaker, this value should be less than 1440.

            checksum                   A checksum of the 10 words that precede it, calculated by XORing zero with these 10 words and putting the result in the checksum field (see example below.)

            metafileData              The actual content of the Windows metafile retrieved by copying the data returned by GetMetafileBits to the file. The number of bytes should be equal to the MS-DOS file length minus 22. The content of a PageMaker placeable metafile cannot currently exceed 64K.

 

 

This header is required for PageMaker only; files stored in this format cannot be directly manipulated by the Windows GDI metafile procedures. The application itself must read the metafile contents into a global memory block and then use the GDI call GetMetaFileBits to create a memory metafile that GDI can manipulate.

 

Files stored in this format should have a . WMF(Windows metafile) extension. This extension causes the file to be listed in the "Place..." command's list box and also instructs PageMaker which import filter to use.