RenderPagesToFiles
Rendering and printing
Description
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 TPDFlib.RenderPagesToFiles(DPI: Double; Const PageRanges: WideString; Options: Integer; Const FileName: WideString): Integer;
ActiveX
Function PDFlib::RenderPagesToFiles(DPI As Double, PageRanges As String, Options As Long, FileName As String) As Long
DLL
int DLRenderPagesToFiles(int InstanceID, double DPI, const wchar_t * PageRanges, int Options, const wchar_t * 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 |