RenderPagesToFilesA

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

Renders the selected document pages described by PageRanges to separate image files

The function accepts the same rendering Options values as RenderPageToFile and RenderDocumentToFile, but PageRanges can select non-contiguous pages such as 1,3,7-9, Odd, or Even 2-20

If FileName contains %p, that token is replaced with the source page number. If FileName does not contain %p, the source page number is inserted before the file extension

The implementation reuses one renderer across the selected page list where the active renderer supports it, which avoids the setup cost of calling RenderPageToFile once per page

Syntax

Delphi

Function DLRenderPagesToFilesA(InstanceID: Integer; DPI: Double; PageRanges: PAnsiChar; Options: Integer; FileName: PAnsiChar): Integer;

DLL

int DLRenderPagesToFilesA(int InstanceID, double DPI, const char * PageRanges, int Options, const char * FileName);

Parameters

DPIThe DPI to use when rendering each page
PageRangesA comma-separated page range list. Use an empty string to render every page
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 output file name or file name pattern. Use %p where the source page number should be inserted

Return values

0No page was rendered
>0The number of pages successfully rendered before completion or the first error