RenderPageToFile
Description
This function renders a page from the selected document to a file on disk. The data written to disk depends on the Options parameter. For best results this function requires GDI+, which is available by default in Windows XP. For other 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. Encrypted documents cannot be rendered, they must be decrypted using Decrypt or DecryptFile.
Syntax
Delphi
function TQuickPDF0813.RenderPageToFile(DPI, Page, Options: Integer;
FileName: WideString): Integer;
ActiveX
Function QuickPDF0813.PDFLibrary::RenderPageToFile(DPI As Long, Page As Long,
Options As Long, FileName As String) As Long
DLL
int QuickPDFRenderPageToFile(int InstanceID, int DPI, int Page, int Options,
wchar_t * FileName)
Parameters
| DPI | The DPI to use when rendering the page. Values over 300 will cause excessive memory usage. |
| Page | The page number to render |
| 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 |
| 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 |
| 1 | The page was rendered correctly and the image file was saved to disk |
| 2 | The file could not be written to disk |