RenderPageTileToFile

Rendering, tiled rendering, file output

Description

File-output counterpart of RenderPageTileToStream with the same pixel coordinates, overlap and background handling

Syntax

Function RenderPageTileToFile(DPI: Double; Page, PixelLeft, PixelTop, PixelWidth, PixelHeight, Overlap, Options, BackgroundMode: Integer; BackgroundColor: Cardinal; Const FileName: WideString): Integer;

Parameters

DPIRender resolution in dots per inch, scaled by the library render scale
PageOne-based page number to render
PixelLeft, PixelTopZero-based tile origin in rendered device pixels
PixelWidth, PixelHeightPositive core tile dimensions before overlap
OverlapExtra pixels requested on each available edge
OptionsRaster format constant for BMP, JPEG, PNG, GIF, TIFF or G4 TIFF
BackgroundModePDF_TILE_BACKGROUND_WHITE, PDF_TILE_BACKGROUND_TRANSPARENT or PDF_TILE_BACKGROUND_CUSTOM
BackgroundColorCustom fill or PNG transparency-key colour
FileNameDestination image path, replaced only after rendering and writing succeed

Return values

1 on success, otherwise 0 and no partial output file is retained

Remarks

If the destination cannot be opened, an existing file is left unchanged; failed rendering cleans up only output opened by this call