Print Method
- Namespace
TXTextControl.WPF
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWPF. dll
Description
Prints a Text Control document or a part of a document.
Syntax
Print(string, bool)
Opens the standard print dialog to get printer settings and prints the document.
public void Print(string docName, bool useLastPrinterSettings);Public Sub Print(docName As String, useLastPrinterSettings As Boolean)| Parameter | Description |
|---|---|
| docName | Specifies the document's name. |
| useLastPrinterSettings | If this parameter is set to true, the dialog box is initialized with the user settings of the previous call. |
Print(string, PageRange, int, Collation)
Prints a Text Control document with the standard printer using the specified page range, copy count and collation settings.
public void Print(string docName, PageRange pageRange, int copyCount, Collation collation);Public Sub Print(docName As String, pageRange As PageRange, copyCount As Integer, collation As Collation)| Parameter | Description |
|---|---|
| docName | Specifies the document's name. |
| pageRange | Specifies a System.Windows.Controls.PageRange structure specifying the range of pages to print. |
| copyCount | Specifies the number of copies to print. |
| collation | Specifies a System.Printing.Collation member specifying whether the printer collates output. |
Print(string, string, PageRange, int, Collation)
Prints a Text Control document with the specified printer using the specified page range, copy count and collation settings.
public void Print(string docName, string printerName, PageRange pageRange, int copyCount, Collation collation);Public Sub Print(docName As String, printerName As String, pageRange As PageRange, copyCount As Integer, collation As Collation)| Parameter | Description |
|---|---|
| docName | Specifies the document's name. |
| printerName | Specifies the name of the printer to which the output is sent. |
| pageRange | Specifies a System.Windows.Controls.PageRange structure specifying the range of pages to print. |
| copyCount | Specifies the number of copies to print. |
| collation | Specifies a System.Printing.Collation member specifying whether the printer collates output. |
Examples
The following example prints the current document. The created object is then available to the surrounding document workflow.
textControl.Print("CustomerName", true);
Console.WriteLine("Text Control is ready for use.");textControl.Print("CustomerName", True)
Console.WriteLine("Text Control is ready for use.")