DARenderPagesToFiles

Direct access, Rendering and printing

Description

Renders pages from an open Direct Access file handle to separate image files without loading the whole document through the normal document model

PageRanges can select non-contiguous pages such as 2,1, 1,4-6, Odd, or Even 2-20. Use an empty string to render every page

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

Syntax

Delphi

Function TPDFlib.DARenderPagesToFiles(FileHandle: Integer; Const PageRanges: WideString; Options: Integer; DPI: Double; Const FileName: WideString): Integer;

ActiveX

Function PDFlib::DARenderPagesToFiles(FileHandle As Long, PageRanges As String, Options As Long, DPI As Double, FileName As String) As Long

DLL

int DLDARenderPagesToFiles(int InstanceID, int FileHandle, const wchar_t * PageRanges, int Options, double DPI, const wchar_t * FileName);

Parameters

FileHandleThe handle returned by DAOpenFile or DAOpenFileReadOnly
PageRangesA comma-separated page range list. Use an empty string to render every page
Options0 = 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
DPIThe DPI to use when rendering each page
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