A unique feature of TX Text Control is the true WYSIWYG (what-you-see-is-what-you-get) rendering. TX Text Control uses a printer or a screen device to render text which results in a 100% accurate display of documents. The used device can be adjusted using the FormattingPrinter TX Text Control .NET for Windows Forms
TXTextControl Namespace
TextControl Class
FormattingPrinter Property
Gets or sets the name of a printer the text dimensions and capabilities of which are used to format the document.
property.

The defined device is used to get font information of how a specific printer would print the text:

  • Exact character sizes
  • Font kerning
  • Spacing

Using this approach, the text on the screen is identical to what appears in a resulting PDF document or when it is printed (on that printer).

FormattingPrinter "Display"

If an application doesn't need a specific printer to be used, the FormattingPrinter property can be set to "Display" - a screen device that looks identical on all machines. But even if you define this rendering using the FormattingPrinter property, on initializing a new Text Control, the default printer is called to get most necessary information.

Static, Global Default Setting

Since version 30.0, the default formatting printer can be defined before a new instance of TXTextControl.TextControl class TX Text Control .NET for Windows Forms
TXTextControl Namespace
TextControl Class
The TextControl class implements a Windows Forms control with high-level text editing features.
and TXTextControl.ServerTextControl class TX Text Control .NET for Windows Forms
TXTextControl Namespace
ServerTextControl Class
The ServerTextControl class implements a component that provide high-level text processing features for server-based applications.
is created. When this default printer driver is defined, TX Text Control is not accessing any other (default) printer or printer spooler. This must be set using the new static property DefaultFormattingPrinter:

Loading...

In a Windows Forms application, this property can be set in the Main entry point of the Program.cs:

Loading...

Every new instance of Text Control uses this default printer driver then:

Loading...

This is the result in the output console:

Display

The same logic is followed for all ServerTextControl instances created in Windows Forms, WPF and ASP.NET (Core) applications. In ASP.NET, this static, global setting can be set in the Main entry point as well:

Loading...

A new instance of ServerTextControl would use "Display" then:

Loading...

Display