DynaPDF Manual - Page 227
Previous Page 226 Index Next Page 228
Function Reference
Page 227 of 839
ConvertEMFSpool
Syntax:
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
{
spcDefault
= 0,
spcIgnorePaperFormat
= 1, // See description
spcDontAddMargins
= 2, // See description
spcLoadSpoolFontsOnly = 4, // Load embedded fonts only
spcFlushPages
= 8
// Write every page to the output file
}TSpoolConvFlags;
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.
Flag
Description
spcIgnorePaperFormat
If set, all pages are scaled to the width of the current page format.
spcDontAddMargins
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
considered.
This flag can be set if the margins for the print spool are known. It is
meaningful only if the flag spcIgnorePaperFormat is absent.
spcLoadSpoolFontsOnly
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
file.
Previous topic: ConvertColors
Next topic: ConvToUnicode