Table of Contents

Method ApplyToStreamAsync

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

ApplyToStreamAsync(Attachment, IReadOnlyList<PageEdit>, Stream, CancellationToken)

Applies a sequence of page edits and writes the result to a writable stream.

public static Task ApplyToStreamAsync(Attachment source, IReadOnlyList<PageEdit> edits, Stream outputStream, CancellationToken cancellationToken = default)

Parameters

source Attachment

The source PDF attachment.

edits IReadOnlyList<PageEdit>

Ordered list of page edits.

outputStream Stream

Writable destination stream.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task

Examples

using MemoryStream output = new();
PdfEditor.ApplyToStream(src, edits, output);
byte[] bytes = output.ToArray();
Share