TX Text Control .NET Server

ControlsFactory Class

Class
Namespace
TXTextControl.Web.MVC.DocumentViewer
Package
TXTextControl.Web.DocumentViewer from nuget.org, the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Web.MVC.DocumentViewer.dll
Install
dotnet add package TXTextControl.Web.DocumentViewer
Also in
TXTextControl.Web.DocumentViewer.Classic as TXTextControl.Web.MVC.DocumentViewer.dll

Description

Contains helper methods to create DocumentViewer MVC extensions.

Syntax

public sealed class ControlsFactory

Examples

The following example prepares the current ASP.NET Core Document Viewer settings that a Razor view passes to the viewer helper to load a server-side document.

TXTextControl.Web.MVC.DocumentViewer.DocumentViewerSettings settings = new()
{
    DocumentPath = @"App_Data\document.pdf",
    ToolbarDocked = true
};
Console.WriteLine($"Document Viewer source: {settings.DocumentPath}");

Members

Constructors

ConstructorDescription
ControlsFactoryInitializes a new instance of the ControlsFactory class.

Methods

MethodDescription
DocumentViewerCreates a DocumentViewer.