Method ApplyToStreamAsync
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
sourceAttachmentThe source PDF attachment.
editsIReadOnlyList<PageEdit>Ordered list of page edits.
outputStreamStreamWritable destination stream.
cancellationTokenCancellationTokenCancels the operation.
Returns
Examples
using MemoryStream output = new();
PdfEditor.ApplyToStream(src, edits, output);
byte[] bytes = output.ToArray();