DARenderPageToStream

Direct access functionality, Rendering and printing

Description

This function is only available in the Delphi edition.

It renders the specified page from the specified document to an image and returns the image data in the supplied TStream.

By default rendering uses the GDI+ system which is available in Windows XP and later.

Option 10, TIFF (G4) output, is only available on Windows Vista and Windows Server 2008 and later.

It is also possible to render using Cairo, use the SetCairoFileName and SelectRenderer

functions.

Syntax

Delphi

function TPDFlib.DARenderPageToStream(FileHandle, PageRef, Options: Integer; DPI: Double; Target: TStream): Integer;

ActiveX

Function PDFlib::DARenderPageToStream(FileHandle As Long, PageRef As Long, Options As Long, DPI As Double, Target As Long) As Long

Parameters

FileHandleA handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions
PageRefA page reference returned by the DAFindPage or DANewPage functions
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 = G4 TIFF output
DPIThe DPI to use when rendering the page. Values over 300 will cause excessive memory usage.
TargetThe stream to place the rendered page into

Return values

0The page could not be rendered. Check that the FileHandle and PageRef parameters contain valid values.
1The page was rendered and the image data was put into the stream