Products Technologies Demo Docs Blog Support Company

MVC DocumentViewer Update: Printing, Resources and Mobile-Friendly Document Signing

We released an update of the ASP.NET MVC DocumentViewer that fixes the Chrome 77 printing issue, provides resource manager support and implements mobile-friendly signature settings.

MVC DocumentViewer Update: Printing, Resources and Mobile-Friendly Document Signing

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. The DocumentViewer can be updated directly by updating the NuGet package:

TXTextControl.Web.DocumentViewer

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.

    Resources

    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:

    Resources

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

    Name Value
    TX_PAGE PAGE NUMBER
  5. Open the Views -> Home -> Index.cshtml view where the DocumentViewer has been added. Add the setting ResourceManager 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;
    }).Render()

    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:

    Resources

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.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

ASP.NET

Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.

ASP.NET Core
Angular
Blazor
JavaScript
React
  • Angular
  • Blazor
  • React
  • JavaScript
  • ASP.NET MVC, ASP.NET Core, and WebForms

Learn more Trial token Download trial

Related Posts

ASP.NETReportingDocument Viewer

HTML5 Based MVC DocumentViewer Public Beta Program Launched

We received many requests for a lightweight, cross-browser compatible document viewer for ASP.NET MVC. In comparison, our pure HTML5-based document editor is used to create and modify documents…


ASP.NETReportingMVC

MVC NuGet Packages for X18 Published

We just published the NuGet packages for the latest version X18 of TX Text Control .NET Server.


ASP.NETReportingDocument Viewer

DocumentViewer: New Two Page View Mode

We released a new version of the MVC DocumentViewer that implements a two page view mode to view pages in a book-like view mode.


ASP.NETDocument ViewerMVC

Configuring ASP.NET and IIS for Larger Requests

Since we released the session-less version of the DocumentViewer, ASP.NET projects must be prepared for sending larger POST data when loading documents from memory.


ASP.NETDocument ViewerMVC

Updated MVC DocumentViewer: Session-less and Improved Image Quality

We published a new version of the ASP.NET MVC DocumentViewer that is now session-less and provides a better image quality.