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
| DPI | The DPI to use when rendering each page |
|---|---|
| PageRanges | A comma-separated page range list. Use an empty string to render every page |
| 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 = TIFF (G4) output |
| FileName | The output file name or file name pattern. Use %p where the source page number should be inserted |
Return values
| 0 | No page was rendered |
|---|---|
| >0 | The number of pages successfully rendered before completion or the first error |