Method RenderPageAsTgaBytesAsync
RenderPageAsTgaBytesAsync(string, int, PdfRenderOptions, bool, CancellationToken)
Renders one page and returns it as a TGA-encoded byte array.
public static Task<byte[]> RenderPageAsTgaBytesAsync(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, TGA output uses RLE compression.
cancellationTokenCancellationTokenCancels the operation.
Returns
Examples
using LMKit.Document.Pdf;
byte[] tga = PdfRenderer.RenderPageAsTgaBytes("report.pdf", pageIndex: 0, rle: true);