Table of Contents

Method RenderPageAsBmpBytes

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

RenderPageAsBmpBytes(string, int, PdfRenderOptions, bool, CancellationToken)

Renders one page and returns it as a BMP-encoded byte array.

public static byte[] RenderPageAsBmpBytes(string inputPath, int pageIndex, PdfRenderOptions options = null, bool rle = false, CancellationToken cancellationToken = default)

Parameters

inputPath string

Path to the source PDF.

pageIndex int

Zero-based index of the page to render.

options PdfRenderOptions

Render options.

rle bool

When true, BMP output uses RLE compression.

cancellationToken CancellationToken

Cancels the operation.

Returns

byte[]

Examples

using LMKit.Document.Pdf;

byte[] bmp = PdfRenderer.RenderPageAsBmpBytes("report.pdf", pageIndex: 0);
Share