streamlit-pdf-viewer
streamlit-pdf-viewer copied to clipboard
Update pdf.js to version 4
PDF.js 4.0 is a major release that contains a number of API changes, features and bugfixes. The following changes are highlighted:
Conversion to JavaScript modules for the builds
Conversion to Fluent for localization
Optimizations for CPU and memory usage
Improvements and bugfixes for the annotation editor and annotation rendering
Removal of the deprecated SVG back-end
Removal of other deprecated functionality and options
One of the limitation of this release is that node should be >= 18.
https://github.com/lfoppiano/streamlit-pdf-viewer/security/dependabot/1
https://github.com/lfoppiano/streamlit-pdf-viewer/commit/5f09846fbc5b4cd71ab910f98b343d681e5808ed
I've modified the method for loading pdfjs-dist and fixed transpilation settings. With these changes, the text is now displayed on top of the PDF in my environment as shown in the attached file. The position is still misaligned, though. 🤔
Since I have updated several library versions, you will need to delete node_modules and package-lock.json once to run in your environment.
Thanks great! Thanks!