We have just released a new package versions of the TX Text Control DocumentViewer for ASP.NET, ASP.NET Core, Angular, and React.
-
TXTextControl.Web.DocumentViewer 32.2.1
https://www.nuget.org/packages/TXTextControl.Web.DocumentViewer/32.2.1 -
@txtextcontrol/tx-ng-document-viewer
https://www.npmjs.com/package/@txtextcontrol/tx-ng-document-viewer/v/32.2.0 -
@txtextcontrol/tx-react-document-viewer
https://www.npmjs.com/package/@txtextcontrol/tx-react-document-viewer/v/32.2.1
Updating the Packages
To update the NuGet package, open the NuGet Package Manager, select nuget.org as the package source, select Updates and locate the TXTextControl.Web.DocumentViewer package. From the Versions drop-down list, select the latest stable version (32.2.1).
To update the Angular npm package use the following command:
npm install @txtextcontrol/tx-ng-document-viewer@latest
To update the React npm package use the following command:
npm install @txtextcontrol/tx-react-document-viewer@latest
Fixed Issues
Version 32.2.1 includes both new features and fixes for known issues. The below tables lists all fixed known issues.
ID | Description | Status |
MVCDV-184 | Some SVG images are not rendered properly | Fixed in 32.2.1 |
MVCDV-1845 | Signature Setup Dialog: "Add" button is not activated directly after image upload | Fixed in 32.2.1 |
MVCDV-183 | First click on the "Clear" button does not deactivate the "Setup and sign" button | Fixed in 32.2.1 |
MVCDV-171 | Remember last signature type setting | Fixed in 32.2.1 |
MVCDV-178 | PDF.js >= 4 is no longer supported | Fixed in 32.2.1 |
MVCDV-168 | The creation date of a selection annotation is marked as invalid | Fixed in 32.2.1 |
MVCDV-180 | The middle dialog tab is selected after clearing the signature pad | Fixed in 32.2.1 |
MVCDV-181 | Undo after inserting an annotation leads to an error | Fixed in 32.2.1 |
MVCDV-155 | Form field becomes empty in the printed / downloaded version | Fixed in 32.2.1 |
MVCDV-175 | Progress bar is invisible on loading document via JavaScript | Fixed in 32.2.1 |
MVCDV-177 | Toolbar cannot be toggled | Fixed in 32.2.1 |
Updating to PDF.js >= v4.0
With version 32.2.1, the DocumentViewer supports PDF.js version 4.0 and later. The new version of PDF.js includes a lot of new features and improvements. When updating to the latest version of the DocumentViewer, make sure to update the PDF.js library to the latest version as well.
In your code, replace the DocumentLoadSettings.PDFJS.BasePath property with the two new properties DocumentLoadSettings.PDFJS.LibrarySourcePath and DocumentLoadSettings.PDFJS.WorkerSourcePath.
ASP.NET Core
This is the old code:
@Html.TXTextControl().DocumentViewer(settings => { | |
settings.DocumentLoadSettings.PDFJS.BasePath = "/Scripts/pdf.js/"; | |
}).Render() |
The following code shows the new code:
@Html.TXTextControl().DocumentViewer(settings => { | |
settings.DocumentLoadSettings.PDFJS.LibrarySourcePath = "/Scripts/pdf.js/pdf.min.mjs"; | |
settings.DocumentLoadSettings.PDFJS.WorkerSourcePath = "/Scripts/pdf.js/pdf.worker.min.mjs"; | |
}).Render() |
Angular
This is the new code for Angular:
<tx-document-viewer | |
width="800px" | |
height="800px" | |
basePath="https://backend.textcontrol.com?access-token=yourtoken" | |
[documentLoadSettings] = "{ | |
pdfjs: { | |
workerSourcePath: 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.0.379/pdf.worker.min.mjs', | |
librarySourcePath: 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.0.379/pdf.min.mjs' | |
}}"> | |
</tx-document-viewer> |
React
This is the new code for React:
<DocumentViewer | |
width="1000px" | |
height="800px" | |
basePath="https://backend.textcontrol.com?access-token=yourtoken" | |
documentLoadSettings={{ pdfjs : { | |
workerSourcePath : "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.0.379/pdf.worker.min.mjs", | |
librarySourcePath: "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.0.379/pdf.min.mjs"}}} | |
> | |
</DocumentViewer> |