TX Text Control .NET for Windows Forms

DocumentController Class

Class|Introduced in 15.0
Namespace
TXTextControl.DocumentServer
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.
Inherits
  1. Component
  2. DocumentController

Description

The DocumentController class is a .NET component that can be used to perform the necessary document handling on the server, when using a control such as the DocumentServer.Web.DocumentViewer. The DocumentController class can be found in the TXTextControl.DocumentServer namespace. It is derived from the System.ComponentModel.Component class. The following describes only the properties and methods defined directly by the DocumentController class. For a list of properties, methods and events inherited from the System.ComponentModel.Component class see the .NET Framework reference.

Syntax

public class DocumentController : Component

Examples

The following example creates a Document Controller instance and configures its char code checked setting for a document workflow.

using TXTextControl.DocumentServer.DocumentController documentController = new();
documentController.CharCodeChecked = 10;

Members

Constructors

ConstructorDescription
DocumentControllerInitializes a new instance of the DocumentController class.

Properties

PropertyDescription
CharCodeCheckedGets or sets the character's code that is used to render checked check boxes.
CharCodeUncheckedGets or sets the character's code that is used to render unchecked check boxes.
CheckBoxFontGets or sets the font used for rendering check boxes.
DpiXGets or sets the horizontal DPI value used for display-related calculations.
DpiYGets or sets the vertical DPI value used for display-related calculations.
PagesGets a collection of all pages contained in the currently loaded document.
TextComponentGets or sets the object of type ServerTextControl that is associated with the DocumentController component. Invoking one of the DocumentController's instance methods will result in an exception being thrown, if the TextComponent property is left unset.

Methods

MethodDescription
DisposeFrees all resources used by the DocumentController instance.
GetBlockFieldNamesGets a list of the names of all the application fields which are contained inside the specified merge block.
GetBlockNamesGets a list of the names of all the merge blocks contained in the document.
GetFieldAdaptersGets a collection of adapters for all application fields in the specified scope.
GetFieldNamesGet field names.
LoadLoads a document from a file that is used for further processing.
LoadFromMemoryLoads a document from memory that is used for further processing.
MergeFieldSets the value of the form field specified through the given adapter to the submitted value.
SaveSaves the document that is currently loaded in the DocumentController to a file.
SaveToMemorySaves the document that is currently loaded in the DocumentController.
Twips2PixelsConverts a value in twips to a value in pixels according to a specified resolution. This is a helper method that is useful when implementing pixel-based document viewers.