We just released a new version of the ASP.NET MVC DocumentViewer that can be used in combination with our product TX Text Control .NET Server for ASP.NET. The DocumentViewer can be updated directly by updating the NuGet package:


The following features made it into this release:

  • Chrome 77 Printing Issue
    Google rolled out a security patch with version 77.0.3865.75 that prevents the print dialog opening automatically in case a PDF document is embedded in an IFRAME. We implemented a fix that allows the DocumentViewer to print the content again directly from the browser.

  • Mobile-Friendly Document Signing
    The MVC DocumentViewer provides a feature to receive electronic signatures from users that are applied to a document. Users are asked to sign on a soft signature pad that is now designed for mobile devices in portrait and landscape mode.

    Signatures on iPhone

  • ResourceManager Support
    All string resources can now be changed and therefore translated using standard resource files. The following tutorial shows how to implement these resource files into applications using the MVC DocumentViewer.

Using the ResourceManager

This tutorial shows how to change string resources of the DocumentViewer.

  1. Create an ASP.NET MVC Web Application as described in this tutorial:
    Creating an ASP.NET MVC DocumentViewer Application With Razor

  2. Select the project in the Solution Explorer and choose Add New Item... from the Project main menu. Select Resource File from the General templates and name it DocumentViewer.


    Click Add to add the file to the project.

  3. Double-click this newly created resource file into the Solution Explorer to edit the content. Set the Access Modifier to Public:


  4. Now insert the following Name/Value string pair to the resource file:

    Name Value
  5. Open the Views -> Home -> Index.cshtml view where the DocumentViewer has been added. Add the setting ResourceManager TX Text Control .NET Server for ASP.NET
    Web.MVC.DocumentViewer Namespace
    DocumentViewerSettings Class
    ResourceManager Property
    Gets or sets the resource manager that can be used to apply custom resources such as translations.
    to the settings, so that the complete HtmlHelper section looks like this:

    @Html.TXTextControl().DocumentViewer(settings => {
    settings.Dock = DocumentViewerSettings.DockStyle.Window;
    settings.ResourceManager = tx_mvc_viewer.DocumentViewer.ResourceManager;
    view raw test.cshtml hosted with ❤ by GitHub

    tx_mvc_viewer is the name of your MVC application.

  6. Compile and start the application. The string Page has been replaced with Page Number:


All resources that are found in the ResourceManager are replaced. A complete RESX file can be downloaded here that could be added directly as a resource file into your project.