ImportEMFFromFileEx

Vector graphics

Description

Imports an EMF file with extended import controls for bitmap fallback and GDI+ processing

Syntax

Delphi

Function TPDFlib.ImportEMFFromFileEx(Const FileName: WideString; FontOptions, GeneralOptions, Options: Integer): Integer;

Parameters

FileNameEMF file to import
FontOptionsFont handling mode used by the EMF importer
GeneralOptionsGeneral EMF import mode
OptionsPDF_EMF_OPTION_USE_GDIPLUS (1) forces bitmap import, PDF_EMF_OPTION_COLOR_IMAGES_AS_JPEG (2) recompresses EMF color images as JPEG where supported, PDF_EMF_OPTION_PROCESS_NULL_PATH (4) enables GDI+ null-path processing, and PDF_EMF_OPTION_SMOOTH_IMAGES (8) enables GDI+ smoothing and high-quality interpolation

Return values

Returns the new ImageID, or 0 if the EMF cannot be imported

Remarks

Use bit 0 when preserving complex GDI drawing exactly as a bitmap is more important than keeping vector commands editable

See also

ImportEMFFromStreamEx, ImportEMFFromFile, ImportEMFFromStream