RenderPageLayerToStream
Rendering, annotations, form fields, stream output
Renders one logical page layer as PNG data into a caller-owned stream
Syntax
function RenderPageLayerToStream(DPI: Double; Page, LayerKind: Integer;
Target: TStream): Integer;
Parameters
| Parameter | Description |
|---|---|
DPI | Positive output resolution in dots per inch |
Page | 1-based page number, clamped to the available page range |
LayerKind | 0 renders base page content without annotations or form fields, 1 renders annotations only, 2 renders form fields only, and 3 renders annotations plus form fields |
Target | Destination stream that remains owned by the caller |
Return values
Returns 1 on success and 0 for invalid input, cancellation, or rendering failure
Remarks
Layer 0 is an opaque PNG, while layers 1 through 3 carry a transparent background so applications can composite interaction visuals independently of the page
Only annotations and widgets with usable appearance streams can be drawn; RepairAnnotationAppearances can generate or refresh supported annotation appearances before rendering
See also
RenderPageLayerToString, RenderPageLayerToFile, RenderPageToStream