RenderPageLayerToFile

Rendering, annotations, form fields, file output

« Back to documentation index

Renders one page layer directly to a PNG file

Syntax

function RenderPageLayerToFile(DPI: Double; Page, LayerKind: Integer;
  const FileName: WideString): Integer;

Parameters

ParameterDescription
DPIPositive output resolution in dots per inch
Page1-based page number
LayerKind0 selects base page content, 1 annotations, 2 form fields, and 3 all interactive objects
FileNameDestination 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