IPrintService Interface
Definition
Platform-abstracted interface for printing PDF documents.
public interface IPrintService
Methods
| Name | Description |
|---|---|
| PrintAsync | Prints the document using the system print dialog. |
| ShowPrintPreviewAsync | Shows a print preview. |
PrintAsync Method
Prints the document using the system print dialog.
public System.Threading.Tasks.Task PrintAsync(Avalonia.Controls.Pdf.Core.IPdfDocument document, Avalonia.Controls.Pdf.Services.PrintOptions options, System.Threading.CancellationToken cancellationToken)
Parameters
document Avalonia.Controls.Pdf.Core.IPdfDocument
The document to print.
options Avalonia.Controls.Pdf.Services.PrintOptions
Print options.
cancellationToken System.Threading.CancellationToken
Cancellation token.
Returns
System.Threading.Tasks.Task
ShowPrintPreviewAsync Method
Shows a print preview.
public System.Threading.Tasks.Task ShowPrintPreviewAsync(Avalonia.Controls.Pdf.Core.IPdfDocument document, Avalonia.Controls.Pdf.Services.PrintOptions options)
Parameters
document Avalonia.Controls.Pdf.Core.IPdfDocument
The document to preview.
options Avalonia.Controls.Pdf.Services.PrintOptions
Print options.
Returns
System.Threading.Tasks.Task
Properties
| Name | Description |
|---|---|
| IsSupported | Gets whether printing is supported on the current platform. |
IsSupported Property
Gets whether printing is supported on the current platform.
public bool IsSupported { get; set; }