# DocumentController Class

> 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.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 15.0
- **Namespace:** `TXTextControl.DocumentServer`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Inherits:** `System.ComponentModel.Component`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer > DocumentController Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/#members)

---

## In This Section

- [DocumentController.CharCodeChecked Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/charcodechecked-property/llms.txt): Gets or sets the character's code that is used to render checked check boxes.
- [DocumentController.CharCodeUnchecked Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/charcodeunchecked-property/llms.txt): Gets or sets the character's code that is used to render unchecked check boxes.
- [DocumentController.CheckBoxFont Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/checkboxfont-property/llms.txt): Gets or sets the font used for rendering check boxes.
- [DocumentController Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/constructor/llms.txt): Initializes a new instance of the DocumentController class.
- [DocumentController.Dispose Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/dispose-method/llms.txt): Frees all resources used by the DocumentController instance.
- [DocumentController.DpiX Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/dpix-property/llms.txt): Gets or sets the horizontal DPI value used for display-related calculations.
- [DocumentController.DpiY Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/dpiy-property/llms.txt): Gets or sets the vertical DPI value used for display-related calculations.
- [DocumentController.GetBlockFieldNames Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/getblockfieldnames-method/llms.txt): Gets a list of the names of all the application fields which are contained inside the specified merge block.
- [DocumentController.GetBlockNames Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/getblocknames-method/llms.txt): Gets a list of the names of all the merge blocks contained in the document.
- [DocumentController.GetFieldAdapters Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/getfieldadapters-method/llms.txt): Gets a collection of adapters for all application fields in the specified scope.
- [DocumentController.GetFieldNames Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/getfieldnames-method/llms.txt): Get field names.
- [DocumentController.Load Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/load-method/llms.txt): Loads a document from a file that is used for further processing.
- [DocumentController.LoadFromMemory Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/loadfrommemory-method/llms.txt): Loads a document from memory that is used for further processing.
- [DocumentController.MergeField Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/mergefield-method/llms.txt): Sets the value of the form field specified through the given adapter to the submitted value.
- [DocumentController.Pages Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/pages-property/llms.txt): Gets a collection of all pages contained in the currently loaded document.
- [DocumentController.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/save-method/llms.txt): Saves the document that is currently loaded in the DocumentController to a file.
- [DocumentController.SaveToMemory Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/savetomemory-method/llms.txt): Saves the document that is currently loaded in the DocumentController.
- [DocumentController.TextComponent Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/textcomponent-property/llms.txt): Gets 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.
- [DocumentController.Twips2Pixels Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/twips2pixels-method/llms.txt): Converts 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.

---

## Nearby

- **Previous:** [InsertMergeBlockDialog.MergeBlockInfo Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/insertmergeblockdialog/mergeblockinfo-property/llms.txt)
- **Next:** [DocumentController.CharCodeChecked Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/documentcontroller/charcodechecked-property/llms.txt)
