Table of Contents

Method RenderPageAsTiffBytesAsync

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

RenderPageAsTiffBytesAsync(string, int, PdfRenderOptions, CancellationToken)

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

public static Task<byte[]> RenderPageAsTiffBytesAsync(string inputPath, int pageIndex, PdfRenderOptions options = null, 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.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task<byte[]>

Examples

using LMKit.Document.Pdf;

byte[] tiff = PdfRenderer.RenderPageAsTiffBytes("scan.pdf", pageIndex: 0);
// For packed multi-page TIFF, use SavePagesAsMultipageTiffBytes.
Share