Class PrintHelper
A helper class for printing. See the Catalog app for an example how to use it.
Inheritance
Namespace: PSPDFKit
Assembly: PSPDFKit.dll
Syntax
public sealed class PrintHelper
Constructors
PrintHelper(Document, Page, String, String)
Initialize the PrintHelper from a Page containing a named Canvas UIElement Will throw an Exception if the Document is null, a document is not open or a Canvas with the given name cannot be found in the Page.
Declaration
public PrintHelper(Document document, Page owningPage, string canvasName, string printJobDescription)
Parameters
Type | Name | Description |
---|---|---|
Document | document | The Document holding the open document to be printed |
Windows. |
owningPage | The Windows. |
System. |
canvasName | The name of a Windows. |
System. |
printJobDescription | The description of the print job displayed by the system printing dialog. |
Properties
PrintMediaSize
Specifies the default selected print media size.
Declaration
public PrintMediaSize PrintMediaSize { get; set; }
Property Value
Type | Description |
---|---|
Windows. |
Watermark
A watermark to place on the printed page.
Declaration
public Watermark Watermark { get; set; }
Property Value
Type | Description |
---|---|
Watermark |
Methods
CreatePrintHelperFromSourceAsync(DocumentSource, Page, String, String)
Creates the PrintHelper from a Page containing a named Canvas UIElement. The document will be opened from the documentSource. Will throw an Exception if the documentSource is invalid or a Canvas with the given name cannot be found in the Page.
Declaration
public static IAsyncOperation<PrintHelper> CreatePrintHelperFromSourceAsync(DocumentSource documentSource, Page owningPage, string canvasName, string printJobDescription)
Parameters
Type | Name | Description |
---|---|---|
Document |
documentSource | The Document |
Windows. |
owningPage | The Windows. |
System. |
canvasName | The name of a Windows. |
System. |
printJobDescription | The description of the print job displayed by the system printing dialog. |
Returns
Type | Description |
---|---|
Windows. |
ShowPrintUIAsync()
Show the Printing Dialog. If printing can't be performed, this method will throw an exception.
Declaration
public IAsyncOperation<bool> ShowPrintUIAsync()
Returns
Type | Description |
---|---|
Windows. |
Events
PrintingCompleteHandler
Invoked when the print task completes.
Declaration
public event TypedEventHandler<PrintHelper, PrintTaskCompletedEventArgs> PrintingCompleteHandler
Event Type
Type | Description |
---|---|
Windows. |