Server-side export
Export the current document as PDF
Make any edits in the browser, then send the current document to the controller. The server returns a generated Adobe PDF.
Server owns the exportThe controller can apply server-side rules, signatures, watermarks, or document processing before returning the PDF.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Export PDF using Controller
Server-side export is the right choice when PDF generation must use trusted server resources or additional processing before delivery.
Key members
Save the current editor document
TXTextControl.saveDocument
Export Adobe PDF
ServerTextControl.Save
How it works
The browser saves the current document in InternalUnicodeFormat and posts it to the controller. The controller loads it into ServerTextControl and saves it as BinaryStreamType.AdobePDF.
Unlike client-side export, this route keeps the PDF creation step on the server, where an application can add security settings, merge data, digital signatures, or storage logic.
textControl.Load(document, BinaryStreamType.InternalUnicodeFormat);
textControl.Save(out var pdf, BinaryStreamType.AdobePDF);
return File(pdf, "application/pdf", "document.pdf");
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0
Source files
See the implementation
The view, browser behavior, and controller are encapsulated in Demos/RichTextEditor/DocumentManagement/ExportPDF.