Print Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Prints a Text Control document or a part of a document.
Syntax
Print(string)
Opens the standard print dialog to get printer settings and prints the document.
public void Print(string docName);Public Sub Print(docName As String)| Parameter | Description |
|---|---|
| docName | Specifies the document's name. |
Print(PrintDocument)
Prints the document using the printer settings of the specified PrintDocument.
public void Print(PrintDocument printDocument);Public Sub Print(printDocument As PrintDocument)| Parameter | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| printDocument | Specifies an instance of the PrintDocument class. Text Control uses the following settings of this object:
|
Print(int, PrintPageEventArgs)
Prints a single page. This method can be called from the PrintPage event handler.
public void Print(int page, PrintPageEventArgs ppe);Public Sub Print(page As Integer, ppe As PrintPageEventArgs)| Parameter | Description |
|---|---|
| page | Specifies a page number to print. |
| ppe | Specifies the event arguments of the print document's PrintPage event. |
Examples
The following example prints the current document. The created object is then available to the surrounding document workflow.
textControl.Print("CustomerName");
Console.WriteLine("Text Control is ready for use.");textControl.Print("CustomerName")
Console.WriteLine("Text Control is ready for use.")