Document Property
- Namespace
TXTextControl.DocumentServer. Web
- Package
TXTextControl.asTextControl. ASP. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline PackagesWeb. DocumentViewer. dll
Description
Gets a snapshot of the currently loaded document for further processing.
Syntax
public byte[] Document { get; }Public ReadOnly Property Document As Byte()Examples
The legacy Web Forms document viewer type is not part of the current ASP.NET Core package. The following example uses the current MVC Document Viewer model for the same server-side workflow.
TXTextControl.Web.MVC.DocumentViewer.DocumentLoadSettings documentLoadSettings = new();
documentLoadSettings.LoadEmbeddedComments = true;Dim documentLoadSettings As New TXTextControl.Web.MVC.DocumentViewer.DocumentLoadSettings()
documentLoadSettings.LoadEmbeddedComments = TrueLimitations
Read only.
Remarks
For a given string path and SaveDocumentEventArgs e you can save the document depending on its file format: For FileFormat.RichTextFormat System.IO.File.WriteAllText(path, new System.Text.ASCIIEncoding().GetString(e.Document)) can be used and System.IO.File.WriteAllBytes(path, e.Document) for all other formats. The document's file format is specified in DocumentViewer.SaveDocumentEventArgs.FileFormat.