RenderPageLayerToFile
Rendering, annotations, form fields, file output
Renders one page layer directly to a PNG file
Syntax
function RenderPageLayerToFile(DPI: Double; Page, LayerKind: Integer;
const FileName: WideString): Integer;
Parameters
| Parameter | Description |
|---|---|
DPI | Positive output resolution in dots per inch |
Page | 1-based page number |
LayerKind | 0 selects base page content, 1 annotations, 2 form fields, and 3 all interactive objects |
FileName | Destination PNG path |
Return values
Returns 1 on success, 0 for invalid input or rendering failure, and 2 when the output file cannot be created
Remarks
The output format is always PNG so annotation-only and form-only results can retain transparent backgrounds for later composition
See also
RenderPageLayerToStream, RenderPageLayerToString, RenderPageToFile