Low-code is a software development approach that enables applications to be developed and deployed faster and with minimal hand coding. While TX Text Control .NET Server for ASP.NET provides the full-featured API to programmatically access all elements of a document, including the MailMerge TX Text Control .NET Server for ASP.NET
DocumentServer Namespace
MailMerge Class
The MailMerge class is a .NET component that can be used to effortlessly merge template documents with database content in .NET projects, such as ASP.NET web applications, web services or Windows services.
component to merge data into templates and customize the entire process, DS Server provides out-of-the-box functionality for the most typical applications.

Merging Documents

For example, in order to merge data into a template using TX Text Control, the following server-side code is required:

// enable MS Word merge fields
TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings() {
ApplicationFieldFormat = TXTextControl.ApplicationFieldFormat.MSWord };
// load JSON data
string jsonData = System.IO.File.ReadAllText("data.json");
// create a temporary ServerTextControl
using (TXTextControl.ServerTextControl serverTextControl =
new TXTextControl.ServerTextControl()) {
serverTextControl.Create();
// load the template
serverTextControl.Load("template.docx", TXTextControl.StreamType.WordprocessingML, ls);
// create the mail merge engine
using (MailMerge mailMerge = new MailMerge()) {
// connect to ServerTextControl
mailMerge.TextComponent = serverTextControl;
// merge data into template
mailMerge.MergeJsonData(jsonData);
}
}
view raw test.cs hosted with ❤ by GitHub

The same process with DS Server is shown in the following code:

[HttpPost]
public IActionResult Merge(Template template) {
// private OAuth settings
var os = new TXTextControl.DocumentServices.DocumentProcessing.OAuth.OAuthSettings(
"dsserver.EMRWLJ123pZirYLDNAF0gP7QzQaB8OfH",
"OGC24l8BcjVpc123Ht0gHJhDjtYJP70a");
// create a new DocumentProcessing object with OAuth settings
DocumentProcessing s_dp = new DocumentProcessing("https://trial.dsserver.io", os);
// load the merge data from JSON text file
List<Report> journal =
JsonConvert.DeserializeObject<List<Report>>(
System.IO.File.ReadAllText("App_Data/data.json"));
// create a new MergeBody object with merge data and template
MergeBody mergeBody = new MergeBody() {
Template = Convert.FromBase64String(template.Document),
MergeData = journal
};
// merge the document
var results = s_dp.Merge(mergeBody, ReturnFormat.TX).Result;
return Ok(results[0]);
}
view raw test.cs hosted with ❤ by GitHub

At first glance, you would think that there is no less code, and that is true. But part of the code is the authentication and data preparation. The actual merge process is done by calling a single HTTP endpoint:

https://example.com/documentprocessing/document/merge

Security

With the TX Text Control shown in the first code, you would have to create your own Web API, take care of security, authentication, and document handling. But at the same time, it gives you more flexibility and customization options because you have full access to the TX Text Control API.

DS Server, on the other hand, encapsulates the entire authentication process and provides an out-of-the-box OAuth process that allows you to create security profiles and securely access endpoints.

Installation

DS Server is a separate product that needs to be installed on a server. The installation process is very simple and can be done in a few minutes. The server can be installed on-premises or in the cloud. The server is a RESTful Web API that can be accessed from any platform and programming language that can send HTTP requests.

Once DS Server is set up, you can access the document services, such as the document editor, document viewer, or document processing endpoints, with a single OAuth profile. With TX Text Control, you would have to implement your own backend that runs the necessary server-side handlers to operate the document editor and document viewer, and you would have to implement the endpoints to process the documents, such as merging or PDF generation.

Comparison Table

The following table shows a comparison between TX Text Control and DS Server:

TX Text Control DS Server
Supported Backend
ASP.NET (Core)
Java ×
PHP ×
All others ×
Supported Client Frameworks
ASP.NET MVC / Blazor
Angular
React
JavaScript (all others)
Backend Requirements
WebSocketHandler deployment required? ×
TCP Windows Service installation required? ×
Security
Integrated OAuth security ×
Admin API ×
Deployment
Windows required
IIS / Kestrel
Docker Support ✓+
PowerShell installation support ✓+

✓: Supported / required, ×: Not supported / required, ✓+: Extended support (more effortless)

Conclusion

DS Server is a low-code solution that provides out-of-the-box document services that can be accessed from any platform and programming language that can send HTTP requests. It encapsulates the entire authentication process and provides an out-of-the-box OAuth process that allows you to create security profiles and securely access endpoints.

TX Text Control provides the full-featured API to programmatically access all elements of a document, including the MailMerge component to merge data into templates and customize the entire process. It gives you more flexibility and customization options because you have full access to the TX Text Control API.

Both products can be used in combination to provide the best of both worlds: A low-code solution for typical document processing tasks and a full-featured API for more complex requirements.