Table of Contents

Method RenderPageAsTgaBytes

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

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

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

public static byte[] RenderPageAsTgaBytes(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, TGA output uses RLE compression.

cancellationToken CancellationToken

Cancels the operation.

Returns

byte[]

Examples

using LMKit.Document.Pdf;

byte[] tga = PdfRenderer.RenderPageAsTgaBytes("report.pdf", pageIndex: 0, rle: true);
Share