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
| DPI | Render resolution in dots per inch, scaled by the library render scale |
|---|---|
| Page | One-based page number to render |
| PixelLeft, PixelTop | Zero-based tile origin in rendered device pixels |
| PixelWidth, PixelHeight | Positive core tile dimensions before overlap |
| Overlap | Extra pixels requested on each available edge |
| Options | Raster format constant for BMP, JPEG, PNG, GIF, TIFF or G4 TIFF |
| BackgroundMode | PDF_TILE_BACKGROUND_WHITE, PDF_TILE_BACKGROUND_TRANSPARENT or PDF_TILE_BACKGROUND_CUSTOM |
| BackgroundColor | Custom fill or PNG transparency-key colour |
| FileName | Destination image path, replaced only after rendering and writing succeed |
Return values
1 on success, otherwise 0 and no partial output file is retained
Remarks
The completed image replaces the destination only after rendering and writing succeed. A render or write failure leaves an existing file intact