DARenderPagesToFilesA
Direct access, Rendering and printing
Description
Renders the requested Direct Access pages to separate image files using the renderer selected with SelectRenderer and the existing page-number filename pattern
The return value counts completed pages; a later failure preserves that count and sets LastRenderError
Renderer 1 uses the internal renderer, renderer 2 uses Cairo, and renderer 3 uses PDFium when the corresponding backend is available in the build
Configure optional libraries with SetCairoFileName or SetPDFiumFileName before selecting them
Pending Direct Access edits are included, the source handle remains open, and rendering does not update its modification date
PDFium supports BMP, JPEG, PNG, GIF, TIFF, and G4 TIFF raster output; other formats fail explicitly
Syntax
Delphi
Function DLDARenderPagesToFilesA(InstanceID, FileHandle: Integer; PageRanges: PAnsiChar; Options: Integer; DPI: Double; FileName: PAnsiChar): Integer;
DLL
int DLDARenderPagesToFilesA(int InstanceID, int FileHandle, const char* PageRanges, int Options, double DPI, const char* FileName);
Parameters
| FileHandle | The handle returned by DAOpenFile or DAOpenFileReadOnly |
|---|---|
| PageRanges | A comma-separated page range list. Use an empty string to render every page |
| Options | PDF_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) |
| DPI | The DPI to use when rendering each page |
| 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 |