uwazi icon indicating copy to clipboard operation
uwazi copied to clipboard

Upgrade PDFjs

Open txau opened this issue 2 years ago • 4 comments

We are several versions behind. Some of the recent changes are addressing problems in word spacing:

https://github.com/mozilla/pdf.js/releases/tag/v2.14.305

this upgrade may also fix the range not satisfiable error, which seems to be related to how PDFjs allocates client memory.

txau avatar May 26 '22 14:05 txau

If the upgrade has breaking changes, consider performing the upgrade via updating the https://github.com/huridocs/react-text-selection-handler and integrating it in Uwazi.

txau avatar Jun 01 '22 16:06 txau

Looked at this. Upgrading PDFjs is not as straight forward. It appears that babel is not transpilling PDFjs correctly resulting in syntax issues within the package, also tried adding a loader to make sure babel transpiles it which did not work.

grafitto avatar Jun 28 '22 11:06 grafitto

depends on #4096

elreplicante avatar Jul 19 '22 10:07 elreplicante

Upgrading PDFjs was quick. However almost all nightmare tests are failing because the nightmare browser does not support the new PDFjs, so when the tests navigate to an entity view that has a PDF, the PDF will be rendered and fails. We have decided to migrate all the 6 remaining nightmare test and forget about it. Here is a list of the nightmare tests and their status:

  • [x] suite1/connections.spec.js (@LaszloKecskes, done in https://github.com/huridocs/uwazi/pull/4968)
  • [x] suite1/attachments.spec.js (@LaszloKecskes, done)
  • [x] suite1/fullTextSearch.spec.js (@LaszloKecskes, done)
  • [x] suite1/mobileSidePanels.spec.js (Passing) (done)
  • [x] ~suite2/quickLabel.spec.js (Passing) (@konzz is working on this)~
  • [x] ~suite2/review.spec.js (Failing) (@konz)~
  • [x] suite2/searchFilters.spec.js (Failing) (done)

Feel free to pick one. Also remember to mention if/when you make an abstraction to reduce code repetition.

grafitto avatar Aug 05 '22 11:08 grafitto