DS Server

Plugins

Topic

Plugins let you add your own code to DS Server instead of running it in a separate application beside the server: an endpoint of your own, a step in the request pipeline, a service that uses the document processing of DS Server. .NET developers who extend a DS Server installation find out here how plugins fit into the server, how to build and deploy one, which DS Server services a plugin can use, and how a plugin receives the documents signed in the Document Viewer.

What a Plugin Is

A plugin is a .NET class library, compiled into a .dll, that DS Server loads when it starts. It contains a public class that implements the IPlugin interface of the NuGet package TXTextControl.DocumentServices.Plugin.Abstractions. Through this interface, a plugin can:

  • Add endpoints. Its ASP.NET Core API controllers answer under the address of DS Server, for example at /plugin/hello.
  • Add middleware and route handlers to the request pipeline of DS Server, for logging or metrics.
  • Register services in the dependency injection container of DS Server, and read the configuration of DS Server, including its appsettings.json file.
  • Run code when DS Server starts and when the plugin is unloaded.
  • Use DS Server's services. Since version 5.0, IDocumentProcessingService gives a plugin the conversion, mail merge, PDF and barcode features of DS Server, and IDocumentEditorSessionService the documents open in the Document Editor.
  • Link a page from the Plugins page of the admin portal.

Plugins are available since DS Server 4.1.0, released in September 2025. The services followed with DS Server 5.0.0.

How DS Server Loads Plugins

Each plugin has its own subfolder in the Plugins folder of the DS Server installation, together with the assemblies it depends on:

DS Server folder/
├── TXTextControl.DocumentServices.dll
├── appsettings.json
└── Plugins/
    ├── README.md
    ├── MyFirstPlugin/
    │   └── MyFirstPlugin.dll
    └── SigningPlugin/
        └── SigningPlugin.dll

When DS Server starts, it searches the subfolders for classes that implement IPlugin and loads them. Its console output lists each plugin with the name and version the plugin reports:

Loading plugins from '/opt/dsserver/Plugins'...
Loaded plugin: MyFirstPlugin (v1.0.0)

A plugin that is added or updated takes effect only after DS Server is restarted. The Plugins page of the admin portal lists the loaded plugins with their name, version and description and whether each one is enabled.

Warning

Plugin Endpoints and OAuth. The endpoints of a plugin run in the same process as DS Server and use its address and port, but they are not covered by its OAuth protection. A plugin protects its own endpoints, with the access token validation of DS Server described in Creating a Plugin.

Versions

DS ServerPackage TXTextControl.DocumentServices.Plugin.AbstractionsWhat a plugin can use
4.1.04.1.0, for .NET 8IPlugin and PluginContext
5.0.0 and later5.0.0 or 5.0.1, for .NET 8 and .NET 10In addition, IDocumentProcessingService, IDocumentEditorSessionService and the constant PluginContext.AuthenticationScheme

DS Server 5.0 is built with .NET 10, and the official sample plugin targets net10.0. The package and its types are documented in the reference: Plugin.Abstractions.

Find the Right Page

If you want toRead
Build, deploy and test a first pluginCreating a Plugin
Protect a plugin endpoint with an access tokenCreating a Plugin
Convert or merge documents in a pluginPlugin Services
Change the document a user has open in the Document EditorPlugin Services
Receive the documents signed in the Document ViewerCustom Signing Endpoints

Where to Start

  1. Build MyFirstPlugin in Creating a Plugin. It shows every step once: the project, the interface, the deployment, the log and the test.
  2. Add the services you need from Plugin Services.
  3. For signing workflows, continue with Custom Signing Endpoints.

Pages in This Section

  • Creating a Plugin: create a class library, implement IPlugin, deploy it into the Plugins folder and protect its endpoint.
  • Plugin Services: use IDocumentProcessingService and IDocumentEditorSessionService in plugin controllers.
  • Custom Signing Endpoints: receive signed documents from the Document Viewer in a plugin endpoint protected by an access token.