What Do You Get in the DocumentServer Namespace?
In version 14.0, we introduced a new namespace to TX Text Control .NET: TXTextControl.DocumentServer. The idea of this namespace is to provide classes and components for typical server-side processes such as mail merge. Since the first release, a lot of new features and improvements were implemented in newer versions. In the main TXTextControl.TextControl and TXTextControl.ServerTextControl classes, you will find the methods and properties to manipulate the text, to add images or to access…


In version 14.0, we introduced a new namespace to TX Text Control .NET:
The idea of this namespace is to provide classes and components for typical server-side processes such as mail merge. Since the first release, a lot of new features and improvements were implemented in newer versions.
In the main TXTextControl.TextControl and TXTextControl.ServerTextControl classes, you will find the methods and properties to manipulate the text, to add images or to access text fields inside of the document. But in order to implement a complex template merging process including nested repeating blocks with 1:n database relationships and various field types, a lot of knowledge and programming is required.
The MailMerge Component - Mail Merge As Easy As 1-2-3
For this purpose, the DocumentServer.MailMerge component can be used. This component can be used to effortlessly merge MS Word template documents with database content in .NET projects, such as ASP.NET web applications, web services or Windows services. The MailMerge component uses a ServerTextControl and fields of the type ApplicationField to merge the database content and a document template. The set of merged documents can be saved in each format available through the StreamType enumeration, either as single documents or as one merged document.
In other words: The MailMerge component encapsulates the whole merge process, so that you can implement mail merge applications with 3 lines of code.
Supported licenses:
- TX Text Control Server for ASP.NET (incl. Windows Forms)
- TX Text Control Server for ASP.NET (incl. WPF)
FieldAdapters - Easy Manipulation of MS Word Fields
In TX Text Control, ApplicationFields represent the MS Word standard fields such as MergeField, Date or NumPages. All switches and parameters of these fields are represented by the Parameters property which gets or sets a string array of the available values.
The DocumentServer namespace contains the FieldAdapter classes for the most commonly used fields. These adapter classes can be used to create or manipulate these MS Word compatible fields without learning the specific switches and possible parameters. All settings can be easily accessed using the available properties.
Supported licenses:
- TX Text Control .NET for Windows Forms
- TX Text Control .NET for WPF
- TX Text Control Server for ASP.NET (incl. Windows Forms)
- TX Text Control Server for ASP.NET (incl. WPF)
ASP.NET DocumentViewer - Cross-browser Document Viewer
This ASP.NET component is designed to view documents on the web without any plug-ins or downloads. In combination with the DocumentServer.DocumentController, all file types supported by TX Text Control can be loaded and displayed in this WYSIWYG viewer.
Additionally, MS Word compatible form fields can be completed using the DocumentServer.Web.DocumentViewer. Also, snapshots of the currently loaded document can be taken for further processing and the user input can be saved separately as well.
Supported licenses:
Related Posts
Create a Table of Contents in Windows Forms using C#
This article explains how to create a table of contents in Windows Forms using the ribbon or programmatically. Creating a table of contents is required to organize large documents.
Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub
This article gives a quick overview of the new repositories, their structure and our plans for the future.
ASP.NETJavaScriptDocument Editor
Detect Toggle Button Changes Using a MutationObserver
This article shows how to detect changes of toggle buttons in the ribbon of the web editor using a MutationObserver. The state of a toggle button in the ribbon visualizes the state of a certain…
Two Ways to Restart Numbered Lists in TX Text Control
In TX Text Control, numbered lists are continued by default and need to be reset when required. There is more than one way if you want to restart numbered lists in a document. In this article, two…
Zoom Tricks: Disabling CTRL + MOUSE WHEEL and More
This article shows how to disable CTRL + MOUSE WHEEL, implement zooming with keyboard and reset the zoom factor to its default value.