Method RenderPageAsBmpBytesAsync
RenderPageAsBmpBytesAsync(string, int, PdfRenderOptions, bool, CancellationToken)
Renders one page and returns it as a BMP-encoded byte array.
public static Task<byte[]> RenderPageAsBmpBytesAsync(string inputPath, int pageIndex, PdfRenderOptions options = null, bool rle = false, CancellationToken cancellationToken = default)
Parameters
inputPathstringPath to the source PDF.
pageIndexintZero-based index of the page to render.
optionsPdfRenderOptionsRender options.
rleboolWhen true, BMP output uses RLE compression.
cancellationTokenCancellationTokenCancels the operation.
Returns
Examples
using LMKit.Document.Pdf;
byte[] bmp = PdfRenderer.RenderPageAsBmpBytes("report.pdf", pageIndex: 0);