DARenderPageToFileA
Direct access functionality, Rendering and printing
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to DARenderPageToFile and string arguments are interpreted using the current SetAnsiMode code page
Renders the specified page from the specified document to an image and saves the image data as a file on disk.
By default rendering uses the GDI+ system which is available in Windows XP and later.
Option 10, TIFF (G4) output, is only available on Windows Vista and Windows Server 2008 and later.
It is also possible to render using Cairo, use the SetCairoFileName and SelectRenderer
functions.
Syntax
Delphi
Function DLDARenderPageToFileA(InstanceID, FileHandle, PageRef, Options: Integer; DPI: Double; FileName: PAnsiChar): Integer;
DLL
int DLDARenderPageToFileA(int InstanceID, int FileHandle, int PageRef, int Options, double DPI, const char * FileName);
Parameters
| FileHandle | A handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions |
|---|---|
| PageRef | A page reference returned by the DAFindPage or DANewPage functions |
| Options | 0 = BMP output 1 = JPEG output 2 = WMF output 3 = EMF output 4 = EPS output 5 = PNG output 6 = GIF output 7 = TIFF output 8 = EMF+ output 9 = HTML5 output 10 = G4 TIFF output |
| DPI | The DPI to use when rendering the page. Values over 300 will cause excessive memory usage. |
| FileName | The path and file name of the file to create to store the rendered page image data in. |
Return values
| 0 | The page could not be rendered. Check the value of the FileHandle and PageRef parameters. |
|---|---|
| 1 | The page was rendered correctly and the image file was saved to disk The file could not be written to disk 2 |