Method RenderPageAsTgaBytes
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
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
- byte[]
Examples
using LMKit.Document.Pdf;
byte[] tga = PdfRenderer.RenderPageAsTgaBytes("report.pdf", pageIndex: 0, rle: true);