Language

PdfDocument.WriteToAsync(Stream) Method

Definition

Writes the document to an output stream on a thread-pool thread.

public System.Threading.Tasks.Task WriteToAsync(System.IO.Stream? out);
member this.WriteToAsync : System.IO.Stream -> System.Threading.Tasks.Task

Parameters

out
Stream

The output stream to which the document is written. Must not be null.

Returns

A task that represents the write operation.

Remarks

This .NET convenience method uses Task.Run to call WriteTo(Stream). It does not use native asynchronous I/O.

Finish all started pages before calling this method. Do not call it after the document is closed. Wait for the returned task to complete before using the document again or closing it.

.NET async wrapper implementation.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to