Method RenderPageAsTiffBytes
RenderPageAsTiffBytes(string, int, PdfRenderOptions, CancellationToken)
Renders one page and returns it as a single-page TIFF-encoded byte array.
public static byte[] RenderPageAsTiffBytes(string inputPath, int pageIndex, PdfRenderOptions options = null, CancellationToken cancellationToken = default)
Parameters
inputPathstringPath to the source PDF.
pageIndexintZero-based index of the page to render.
optionsPdfRenderOptionsRender options.
cancellationTokenCancellationTokenCancels the operation.
Returns
- byte[]
Examples
using LMKit.Document.Pdf;
byte[] tiff = PdfRenderer.RenderPageAsTiffBytes("scan.pdf", pageIndex: 0);
// For packed multi-page TIFF, use SavePagesAsMultipageTiffBytes.