RenderPageRegionToFileEx
Rendering and printing
Description
Renders a rectangular region directly to a file in the selected raster format
Syntax
function TPDFlib.RenderPageRegionToFileEx(DPI: Double; Page: Integer;
Left, Top, Width, Height: Double; const Options: TPDFlibPageRasterOptions;
const FileName: WideString; out Info: TPDFlibPageRasterInfo): Integer;
Parameters
| DPI, Page | A positive finite resolution and a 1-based page number |
|---|---|
| Left, Top, Width, Height | A positive rectangle in default PDF user-space points from the top-left of the effective rotated page box. The whole rectangle must lie inside that box |
| Options | A TPDFlibPageRasterOptions value selecting the raster format, page box, optional-content state and rendering policies |
| FileName | The destination image path. The library completes the raster in memory before publishing the file |
| Info | An output TPDFlibPageRasterInfo receiving the raster geometry and effective rendering choices |
The coordinates and raster options follow RenderPageRegionToStream. Choose the format through Options.Format. The file extension is part of the supplied name
Return values
Returns 1 after publishing the rendered file, or 0 on rejection, render failure or publication failure. The library first completes the raster in memory and only then publishes the destination