Print Method
- Namespace
TXTextControl.DocumentServer
- Package
TXTextControl.asTextControl. WPF. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline Packagesdll
Description
Prints the merged document.
Syntax
Print(PrintDocument)
Prints the merged document. It uses the 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(string, string, short, bool)
Prints the merged document with specific settings for the document name, the printer name, the number of copies and whether it should be collated or not.
public void Print(string docName, string printerName, short copyCount, bool collate);Public Sub Print(docName As String, printerName As String, copyCount As Short, collate As Boolean)| Parameter | Description |
|---|---|
| docName | Specifies the document's name. |
| printerName | Specifies the name of the printer to which the output is sent. |
| copyCount | Specifies the number of copies to print. |
| collate | Collates output by printing every page of the first copy, then every page of the second copy, and so on. When collate is set to false, the printer prints every copy of the first page, then every copy of the second page, and so on. |
Examples
The following example prints the current document. The created object is then available to the surrounding document workflow.
mailMerge.Print("CustomerName", "CustomerName", 1, true);
Console.WriteLine("Mail Merge is ready for use.");mailMerge.Print("CustomerName", "CustomerName", 1, True)
Console.WriteLine("Mail Merge is ready for use.")