Products Technologies Demo Docs Blog Support Company

WYSIWYG: What You Need to Know!

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 the text which results in a 100% accurate display of documents. The used device can be adjusted using the FormattingPrinter property. The defined device is used to get font information of how a specific printer would print the text: Exact character sizes, spacing, font kerning and many other details. Using this approach, the text on the…

WYSIWYG: What You Need to Know!

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 the text which results in a 100% accurate display of documents. The used device can be adjusted using the FormattingPrinter property.

The defined device is used to get font information of how a specific printer would print the text: Exact character sizes, spacing, font kerning and many other details. Using this approach, the text on the screen is identical to what appears in a PDF document or on printed paper.

The following animation shows the differences while switching between a printer, the screen device and the XPS Document Writer. You can see that the character spacing and line spacing is slightly different when the FormattingPrinter is switched.

WYSIWYG: What you need to know!

While this approach has mainly advantages, it might confuse end-users when using different devices. Consider the following situation:

A Windows Forms application uses TX Text Control .NET for Windows Forms to create reporting templates. The FormattingPrinter property is set to it's default value "Standard" which is the standard printer on the client machine. The created template is now merged on another machine or a server using ServerTextControl. By default, a ServerTextControl also uses the standard printer on the hosting machine which might be a different printer. As a consequence, the resulting document might look slightly different than on the client machine where the template has been originally designed on.

To avoid those differences, the FormattingPrinter property should be set to use the same device. Either you use a specific printer that is used server-side to create your documents or both instances (TextControl and ServerTextControl) are set to "Display" - a screen device that looks similar on all machines.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

Windows FormsGetting StartedTutorial

Windows Forms Tutorial: Create Your First Windows Forms C# Application

This tutorial shows how to create your first Windows Forms application with C# using TX Text Control .NET for Windows Forms in Visual Studio 2022.


ASP.NETASP.NET CoreMailMerge

How to Mail Merge MS Word DOCX Documents in ASP.NET Core C#

Mail merge is the process of merging data, such as Json or IEnumerable objects, into a template document, such as a DOC or DOCX file. This tutorial is a walkthrough of the steps necessary to…


AngularDocument EditorNode.js

Creating an Angular Document Editor Application with a Node.js WebSocket Server

This tutorial shows how to create an Angular application that uses the Document Editor with a Node.js WebSocket server.


ASP.NETASP.NET CoreMailMerge

Adding SVG Watermarks to Documents

This article shows how to add SVG images to document section headers that repeat automatically on each page. This watermark will be inserted vertically and horizontally centered on each section page.


ASP.NETASP.NET CoreMailMerge

Using MailMerge in ASP.NET Core 6 Web Applications

This article shows how to use the TX Text Control ASP.NET MailMerge class to merge templates with JSON data within a .NET 6 application in Visual Studio 2022.