RenderPageToFileA

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 RenderPageToFile and string arguments are interpreted using the current SetAnsiMode code page

This function renders a page from the selected document to a file on disk. The data written to disk depends on the Options parameter.

By default rendering uses the GDI+ system which is available by default in Windows XP and later.

This function renders a page from the selected document to a file on disk. The data written to disk depends on the Options parameter.

By default rendering uses the GDI+ system which is available by default 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

For images with /Alternates, the built-in renderer keeps a visible base image or selects the first visible optional-content alternate as required by ISO 32000-1

Syntax

Delphi

Function DLRenderPageToFileA(InstanceID: Integer; DPI: Double; Page, Options: Integer; FileName: PAnsiChar): Integer;

DLL

int DLRenderPageToFileA(int InstanceID, double DPI, int Page, int Options, const char * FileName);

Parameters

DPIThe DPI to use when rendering the page. Values over 300 will cause excessive memory usage
PageThe page number to render
OptionsPDF_RENDER_BMP = 0 (BMP output), PDF_RENDER_JPEG = 1 (JPEG output), PDF_RENDER_WMF = 2 (WMF output), PDF_RENDER_EMF = 3 (EMF output), PDF_RENDER_EPS = 4 (EPS output), PDF_RENDER_PNG = 5 (PNG output), PDF_RENDER_GIF = 6 (GIF output), PDF_RENDER_TIFF_RGB = 7 (TIFF output), PDF_RENDER_EMFPLUS = 8 (EMF+ output), PDF_RENDER_HTML5 = 9 (HTML5 output), PDF_RENDER_TIFF_G4 = 10 (G4 TIFF output), PDF_RENDER_EMF_DUAL = 11 (EMF+ Dual output)
FileNameThe path and file name of the file to create to store the rendered page image data in

Return values

0The page could not be rendered
1The page was rendered correctly and the image file was saved to disk The file could not be written to disk 2