TXTextControl.TextControl.Print Method

Prints a Text Control document or a part of a document.

Print(String)

Opens the standard print dialog to get printer settings and prints the document.

[C#]
public void Print(string docName);
[Visual Basic]
Public Sub Print(ByVal docName As String)
Member Description
docName

Specifies the document's name.

Print(PrintDocument)

Prints the document using the printer settings of the specified PrintDocument.

[C#]
public void Print(System.Drawing.Printing.PrintDocument printDocument);
[Visual Basic]
Public Sub Print(ByVal printDocument As System.Drawing.Printing.PrintDocument)
Member Description
printDocument

Specifies an instance of the PrintDocument class. Text Control uses the following settings of this object:


Setting Meaning
DocumentName Specifies the document's name.
PrintController Specifies the document's print controller.
PrinterSettings.FromPage The first page to print.
PrinterSettings.ToPage The last page to print.
PrinterSettings.Copies The number of copies to print.
PrinterSettings.Collate Specifies how the printed pages are sorted.
PrinterSettings.PrinterName Specifies the name of the printer.
PrinterSettings.PrintToFile Specifies whether the printed pages are saved in a file.
PrinterSettings.PrintRange Specifies the range of pages to print.
DefaultPageSettings.Color Specifies whether the printed pages are printed colored.

Print(Int32, PrintPageEventArgs)

Prints a single page. This method can be called from the PrintPage event handler.

[C#]
public void Print(int page, System.Drawing.Printing.PrintPageEventArgs ppe);
[Visual Basic]
Public Sub Print(ByVal page As Integer, ByVal ppe As System.Drawing.Printing.PrintPageEventArgs)
Member Description
page

Specifies a page number to print.

ppe

Specifies the event arguments of the print document's PrintPage event.

See Also