Method RenderPageAsPnmBytes
RenderPageAsPnmBytes(string, int, PdfRenderOptions, CancellationToken)
Renders one page and returns it as a PNM-encoded byte array.
public static byte[] RenderPageAsPnmBytes(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[] pnm = PdfRenderer.RenderPageAsPnmBytes("report.pdf", pageIndex: 0);