PdfSaveAsRequestedEventArgs Class
Definition
Arguments for Avalonia.Controls.PdfViewer.SaveAsRequested. Set Avalonia.Controls.PdfSaveAsRequestedEventArgs.Handled to write the document in the application instead of through the viewer's built-in save picker; Avalonia.Controls.PdfSaveAsRequestedEventArgs.GetDocumentBytesAsync(System.Threading.CancellationToken) gives the PDF with its current annotation edits.
public class PdfSaveAsRequestedEventArgs
Methods
| Name | Description |
|---|---|
| GetDocumentBytesAsync | Exports the document, including annotation edits, as PDF bytes. |
GetDocumentBytesAsync Method
Exports the document, including annotation edits, as PDF bytes.
public System.Threading.Tasks.Task<byte[]> GetDocumentBytesAsync(System.Threading.CancellationToken cancellationToken)
Parameters
cancellationToken System.Threading.CancellationToken
Returns
System.Threading.Tasks.Task<byte[]>
Properties
| Name | Description |
|---|---|
| Document | The open document. |
| Handled | Set to true to skip the built-in save picker. |
| SuggestedFileName | A file name derived from the document title or source, with a .pdf extension. |
Document Property
The open document.
public Avalonia.Controls.Pdf.Core.IPdfDocument Document { get; set; }
Handled Property
Set to true to skip the built-in save picker.
public bool Handled { get; set; }
SuggestedFileName Property
A file name derived from the document title or source, with a .pdf extension.
public string SuggestedFileName { get; set; }