DynaPDF Manual - Page 227

Previous Page 226   Index   Next Page 228

Function Reference
Page 227 of 839
SI32 pdfConvertEMFSpool(
const PPDF* IPDF,
// Instance pointer
const char* SpoolFile, // The spool file that should be converted
double LeftMargin,
// Additional margin
double TopMargin,
// Additional margin
TSpoolConvFlags Flags) // see below
typedef enum
= 0,
= 1, // See description
= 2, // See description
spcLoadSpoolFontsOnly = 4, // Load embedded fonts only
= 8
// Write every page to the output file
The function converts an EMF spool file to PDF. The function loads also embedded fonts which are
required to sucessfully convert the embedded EMF files. The function does not create a new PDF file
and it does not close the PDF file after all pages were converted. The EMF pages will be added to the
end of the exiting pages of the PDF file in memory (see example below the function description).
Before calling the function, the page format of the first page should be set with SetBBox() or with
SetPageWidth() / SetPageHeight(). The initial page format is usually taken from the DEVMODE
structure of the print job. The current page format is used by default to calculate margins which are
maybe required.
The current orientation is set to all pages which will be added (see SetOrientation()). The current
color space can be set to any device color space. If the color space is set to DeviceGray or
DeviceCMYK then all colors will be converted to that color space. If the current color space is set to
a non-device space, then it will be changed to DeviceRGB.
If set, all pages are scaled to the width of the current page format.
If set, the page format is calculated from the rclFrame rectangle of each EMF
file as usual but the current page format is not used to calculate margins which
are maybe required. The parameters Left- and TopMargin will still be
This flag can be set if the margins for the print spool are known. It is
meaningful only if the flag spcIgnorePaperFormat is absent.
If set, the function loads only embedded fonts and does not convert any EMF
file. This flag can be useful if you want to use your own spool file parser and if
the parser is not able to load embedded fonts. The flags mfUseUnicode and
mfIgnoreEmbFonts must be set when converting the EMF files of the spool

Previous topic: ConvertColors

Next topic: ConvToUnicode