TX Text Control .NET for Windows Forms

PrintPreview Method

Method
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Shows a print preview of the current document.

Syntax

PrintPreview(string)

Shows a print preview of the current document.

public void PrintPreview(string docName);
ParameterDescription
docName

Specifies the document's name.

PrintPreview(PrintDocument)

Shows a print preview of the current document using settings from the specified PrintDocument object.

public void PrintPreview(PrintDocument printDocument);
ParameterDescription
printDocument

Specifies an instance of the PrintDocument class.

Examples

The following example opens a print preview for the current document. The created object is then available to the surrounding document workflow.

textControl.PrintPreview("CustomerName");
Console.WriteLine("Text Control is ready for use.");