LoadDocumentFromMemory Method
- Namespace
TXTextControl.DocumentServer. Web
- Package
TXTextControl.asTextControl. ASP. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline PackagesWeb. DocumentViewer. dll
Description
Loads a document from a file that is used for further processing.
Syntax
public void LoadDocumentFromMemory(object data, FileFormat format);Public Sub LoadDocumentFromMemory(data As Object, format As FileFormat)Parameters
| Parameter | Description |
|---|---|
| data | Specifies a memory variable from which the document is loaded. |
| format | Specifies one of the DocumentServer.FileFormat values. |
Examples
DocumentServer.Web.DocumentViewer.LoadDocumentFromMemory belongs to the legacy Web Forms viewer. In the current ASP.NET Core viewer, configure the server-rendered component through DocumentViewerSettings.DocumentPath; interactive page state and styling are handled by the viewer client.
documentViewerSettings.DocumentPath = @"App_Data\document.docx";
if (!string.IsNullOrWhiteSpace(documentViewerSettings.DocumentPath))
{
Console.WriteLine($"Document Path: {documentViewerSettings.DocumentPath}");
}documentViewerSettings.DocumentPath = "App_Data\document.docx"
If Not String.IsNullOrWhiteSpace(documentViewerSettings.DocumentPath) Then
Console.WriteLine($"Document Path: {documentViewerSettings.DocumentPath}")
End If