RenderPageLayerToStream

Rendering, annotations, form fields, stream output

« Back to documentation index

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

ParameterDescription
DPIPositive output resolution in dots per inch
Page1-based page number, clamped to the available page range
LayerKind0 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
TargetDestination 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