ImportEMFFromFileA
Vector graphics, Image handling
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to ImportEMFFromFile and string arguments are interpreted using the current SetAnsiMode code page
Adds a WMF or EMF image from a file to the selected document.
Once an image has been added to the document it can be drawn on any page multiple times without further increasing the size of the PDF file.
Syntax
Delphi
Function DLImportEMFFromFileA(InstanceID: Integer; FileName: PAnsiChar; FontOptions, GeneralOptions: Integer): Integer;
DLL
int DLImportEMFFromFileA(int InstanceID, const char * FileName, int FontOptions, int GeneralOptions);
Parameters
| FileName | The file name of the image to add. If GeneralOptions is 1 this parameter is ignored, otherwise the following values take effect: 0 = Use the first font added to the PDF 1 = Automatically add fonts as non-embedded TrueType fonts |
|---|---|
| FontOptions | |
| GeneralOptions | 0 = Import as a vector image 1 = Import as a bitmap image |
Return values
| 0 | The image could not be added |
|---|---|
| Non-zero | The image was added successfully. The ImageID is returned which can be passed to functions like SelectImage and DrawImage. |