Word conversion
Export the DOCX sample
The viewer displays the original Word document. Choose an output format to convert and download the same server-side source.
DOCX
SOURCE DOCUMENT
sample.docx
WordprocessingML · formatted document
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Publish one Word source in several formats
DOCX can remain the authoring format while server-side conversion produces files suited to review, interchange, and web publishing. The source document is loaded once per request and saved directly to the selected target format.
Key members
Load DOCX
ServerTextControl.Load
Export binary output
ServerTextControl.Save
Display the source
DocumentViewerSettings.DocumentPath
How it works
The Document Viewer receives the physical DOCX path and renders the original file without exposing it as a public static asset. Each export request opens that same file in a new ServerTextControl instance.
PDF is returned as a binary stream. RTF and HTML use string stream formats and are encoded as UTF-8 downloads by the controller.
textControl.Load(sourcePath, StreamType.WordprocessingML);
textControl.Save(out byte[] pdf, BinaryStreamType.AdobePDF);
textControl.Save(out string rtf, StringStreamType.RichTextFormat);
textControl.Save(out string html, StringStreamType.HTMLFormat);
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
Displays supported document and PDF formats in the browser.
dotnet add package TXTextControl.Web.DocumentViewer --version 34.2.0