DARenderPageToFile
Direct access functionality, Rendering and printing
Description
Renders the specified page from the specified document to an image and saves the image data as a file on disk.
For best results this function requires GDI+, which is available by default in Windows XP. For earlier operating systems you may need the GDI+ redistributable available from Microsoft, which is called "gdiplus.dll". You can use the SetGDIPlusFileName function to specify where this DLL is installed.
Syntax
Delphi
function TQuickPDF0813.DARenderPageToFile(FileHandle, PageRef, Options,
DPI: Integer; FileName: WideString): Integer;
ActiveX
Function QuickPDF0813.PDFLibrary::DARenderPageToFile(FileHandle As Long,
PageRef As Long, Options As Long, DPI As Long,
FileName As String) As Long
DLL
int QuickPDFDARenderPageToFile(int InstanceID, int FileHandle, int PageRef,
int Options, int DPI, wchar_t * 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 |
| 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 |
| 2 | The file could not be written to disk |