Skip to main content

IPrintService Interface

Definition​

Assembly:Avalonia.Controls.PdfViewer
Package:Avalonia.Controls.PdfViewer

Platform-abstracted interface for printing PDF documents.

public interface IPrintService

Methods​

NameDescription
PrintAsyncPrints the document using the system print dialog.
ShowPrintPreviewAsyncShows 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​

NameDescription
IsSupportedGets whether printing is supported on the current platform.

IsSupported Property​

Gets whether printing is supported on the current platform.

public bool IsSupported { get; set; }