PdfPrintRequestedEventArgs Class
Definition
Raised before the viewer prints. Set Avalonia.Controls.PdfPrintRequestedEventArgs.Handled to take over printing in the application; the built-in platform print service is then skipped.
public class PdfPrintRequestedEventArgs
Methods
| Name | Description |
|---|---|
| GetDocumentBytesAsync | Exports the document, including unsaved annotation edits, as PDF bytes. |
GetDocumentBytesAsync Method
Exports the document, including unsaved 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 loaded document. |
| Handled | Set to true when the application has handled the request itself. |
| Options | Print options; the viewer pre-fills Avalonia.Controls.Pdf.Services.PrintOptions.Title and Avalonia.Controls.Pdf.Services.PrintOptions.Owner. |
Document Property
The loaded document.
public Avalonia.Controls.Pdf.Core.IPdfDocument Document { get; set; }
Handled Property
Set to true when the application has handled the request itself.
public bool Handled { get; set; }
Options Property
Print options; the viewer pre-fills Avalonia.Controls.Pdf.Services.PrintOptions.Title and Avalonia.Controls.Pdf.Services.PrintOptions.Owner.
public Avalonia.Controls.Pdf.Services.PrintOptions Options { get; set; }