Table of Contents

Method SavePagesAsMultipageTiffBytesAsync

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

SavePagesAsMultipageTiffBytesAsync(string, PdfRenderOptions, IProgress<PdfRenderProgressEventArgs>, CancellationToken)

Renders the selected pages and returns them as a multi-page TIFF byte array.

public static Task<byte[]> SavePagesAsMultipageTiffBytesAsync(string inputPath, PdfRenderOptions options = null, IProgress<PdfRenderProgressEventArgs> progress = null, CancellationToken cancellationToken = default)

Parameters

inputPath string

Path to the source PDF.

options PdfRenderOptions

Render options.

progress IProgress<PdfRenderProgressEventArgs>

Optional progress callback fired after each rendered page.

cancellationToken CancellationToken

Cancels the operation between pages.

Returns

Task<byte[]>

Examples

using LMKit.Document.Pdf;

byte[] tiff = PdfRenderer.SavePagesAsMultipageTiffBytes("scan.pdf");
// Upload tiff to S3, attach to email, etc.

Remarks

Internally writes to a temporary file then reads the bytes, because the native multi-page TIFF writer only targets a file path.

Share