Skip to main content

PdfViewer.SaveDocumentAsync(Stream) Method

Saves the current PDF document to a stream.

Namespace: DevExpress.Maui.Pdf

Assembly: DevExpress.Maui.Pdf.dll

NuGet Package: DevExpress.Maui.Pdf

Declaration

public Task SaveDocumentAsync(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A stream that contains a PDF file.

Returns

Type Description
Task

A task that allows you to wait for the document to be saved.

Remarks

The following example saves the current document to a MemoryStream:

private async void DXButton_Clicked(object sender, EventArgs e) {
    using Stream stream = new MemoryStream();
    await pdfViewer.SaveDocumentAsync(stream);
    // Do something with the stream.
}
See Also