You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to upgrade PDF.js from 1.8.514 to 2.10.377. However, we are running into an issue with annotations where annotations that were saved in a PDF while using an older version do not show up when viewing the PDF using the newer version.
For example, an old annotation was saved at this location: /div[1]/div[3]/div[2]/div[37]. After upgrading PDF.js, the annotation no longer appears. When saving a new annotation at the same spot, I can see that the location is now /div[1]/div[3]/div[2]/span[44]. Could this have to do with this (very old) change?
I'm wondering if there's a reliable way to translate these old annotations so that they work with the newer versions of PDF.js. (I tried changing the last div to a span and adding 7, but alas that only worked for a handful of annotations.)
Attach (recommended) or Link to PDF file here:
Configuration:
Web browser and its version: Chrome 100.0.4896.60
Operating system and its version: macOS 12.3
PDF.js version: 1.8.514 and 2.10.377
Is a browser extension: no
Steps to reproduce the problem:
Create an annotation using an old version of PDF.js and this library (which is also very old)
Upgrade PDF.js and attempt to view the same PDF plus annotations
What is the expected behavior? (add screenshot)
The annotation appears in the right spot.
What went wrong? (add screenshot)
The annotation does not appear at all.
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
The text was updated successfully, but these errors were encountered:
We are trying to upgrade PDF.js from 1.8.514 to 2.10.377.
Please note that neither of those versions are supported any more, please find the latest releases at https://mozilla.github.io/pdf.js/getting_started/#download
Furthermore, note that it's generally very difficult to provide any assistance with updates from such "ancient" version of the PDF.js library since there's literally been thousands of changes since then.
For example, an old annotation was saved at this location: /div[1]/div[3]/div[2]/div[37]. After upgrading PDF.js, the annotation no longer appears. When saving a new annotation at the same spot, I can see that the location is now /div[1]/div[3]/div[2]/span[44]. Could this have to do with this (very old) change?
Unfortunately it's simply impossible to help here, since we cannot even reproduce the problem you're describing.
However, it does sound like you were perhaps doing something that we've never officially supported, and note that the exact format/contents of the textLayer has changed a lot with recent improvements.
If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.
Create an annotation using an old version of PDF.js and this library (which is also very old)
Please note that we unfortunately can't provide any help/support other projects here (and that one also looks completely unmaintained).
We are trying to upgrade PDF.js from 1.8.514 to 2.10.377. However, we are running into an issue with annotations where annotations that were saved in a PDF while using an older version do not show up when viewing the PDF using the newer version.
For example, an old annotation was saved at this location:
/div[1]/div[3]/div[2]/div[37]
. After upgrading PDF.js, the annotation no longer appears. When saving a new annotation at the same spot, I can see that the location is now/div[1]/div[3]/div[2]/span[44]
. Could this have to do with this (very old) change?I'm wondering if there's a reliable way to translate these old annotations so that they work with the newer versions of PDF.js. (I tried changing the last
div
to aspan
and adding 7, but alas that only worked for a handful of annotations.)Attach (recommended) or Link to PDF file here:
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
The text was updated successfully, but these errors were encountered: