New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade PDF.js in Via and the browser extension #366
Comments
Around the beginning of July 2018, pdf.js removed the |
Thanks for the notice @felliott. |
As of 12-2018, the PDFJS version bundled in Firefox 64.0 (on Ubuntu 18.04 64bit) is (The PDFJS versions in Via and the Chrome browser extension are still 1.1.24 and 1.1.215 respectively). The API changes seem to be substantial in volume, but hopefully not in depth (see the diff of api.js in the tab Files Changed). Unfortunately, there is no comprehensive overview of the changes to 2.0 (or even among the 1.x minor revisions), only examples update. |
There are few more issues across the Hypothesis project related to the PDF.js update: |
@robertknight I would be curious in your opinion on what is the biggest blocker in upgrading PDF.js: Is it the anchoring issues between PDF.js versions (e.g. hypothesis/browser-extension#12) or technical issues with recent PDF.js API changes / incompatibilities? |
Hi @gavento - making sure that annotations that anchored with older versions of PDF.js still anchor after we update the copy in the browser extension and Via is the main concern. The Hypothesis client's "fuzzy anchoring" algorithm is not sufficiently robust to some of the typical changes in text output between older and newer PDF.js versions. For example, changes in where spaces appear in the text layer. PDF.js API changes haven't posed a major issue. |
I was trying to upgrade the PDF.js to 2.x version. But, I'm facing issue with the frame syncing. The |
Hello @JamesPJ - PDF.js is not part of the client. Are you trying to use a newer version of PDF.js in the browser extension, Via or with a different tool? The Hypothesis client already supports recent versions of PDF.js, at least the version shipped with the stable release of Firefox (2.1.97). You shouldn't need to make any code changes to the client to use it with that version. If you are trying to build your own version of the client for whatever reason, I would suggest to start with getting the simplest configuration working, which is the client's development server at http://localhost:3000. |
@robertknight Thank you for the quick response. Yes, I was trying the new PDF.js version with the browser extension base by combining the features of client. Let me check whether client alone works for me. |
Closing in favor of hypothesis/via#81 |
We are currently shipping PDF.js v1.1.215 (June 2015) with the browser extension and v1.1.24 (~ March 2015) with Via. This means that we are missing out on 2+ years worth of PDF compatibility improvements, bug fixes and performance improvements.
I did try upgrading PDF.js not long ago but ran into issues anchoring existing annotations described in hypothesis/browser-extension#12 , which need to be investigated and resolved.
The text was updated successfully, but these errors were encountered: