Using the PDFViewer with the latest version of PDF.js (3.9.179) throws js exceptions. Version 3.4.120 is the last one, with which no js exception is thrown.
Dojo example: https://dojo.telerik.com/IHedIhur/3
The file is loaded, however, js exceptions are thrown:
The --scale-factor
CSS-variable must be set, to the same value as viewport.scale
, either on the container
-element itself or higher up in the DOM. text_layer.js:480:14
No js exceptions when using PDF.js versions newer than v3.4.120.
I was able to find a workaround for this by injecting a function on top of the PDF.js renderTextLayer function to set the --scale-factor. It has not been fully tested yet, but it does get rid of the console.errors and the PDF renders fine.
Here is a dojo with the workaround: https://dojo.telerik.com/@broderickhyman/AGuXAMaP/3