pdf.js/src
Jonas Jenwald 0c31320c12 [api-minor] Improve thumbnail handling in documents that contain interactive forms
To improve performance of the sidebar we use the page-canvases to generate the thumbnails whenever possible, since that avoids unnecessary re-rendering when the sidebar is open. This works generally well, however there's an old problem in PDF documents that contain interactive forms (when those are enabled): Note how the thumbnails become partially (or fully) blank, since those Annotations are not included in the OperatorList.[1]

We obviously want to keep using the `PDFThumbnailView.setImage`-method for most documents, however we need a way to skip it only for those pages that contain interactive forms.
As it turns out it's unfortunately not all that simple to tell, after the fact, from looking only at the OperatorList that some Annotations were skipped. While it might have been possible to try and infer that in the viewer, it'd not have been pretty considering that at the time when rendering finishes the annotationLayer has not yet been built.
The overall simplest solution that I could come up with, was instead to include a *summary* of the interactive form-state when doing the final "flushing" of the OperatorList and expose that information in the API.

---
[1] Some examples from our test-suite: `annotation-tx2.pdf` where the thumbnail is completely blank, and `bug1737260.pdf` where the thumbnail is missing the "buttons" found on the page.
2022-07-30 16:53:32 +02:00
..
core [api-minor] Improve thumbnail handling in documents that contain interactive forms 2022-07-30 16:53:32 +02:00
display [api-minor] Improve thumbnail handling in documents that contain interactive forms 2022-07-30 16:53:32 +02:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
scripting_api [JS] Update siblings when a field is updated after a calculation (#15092) 2022-06-24 14:23:06 +02:00
shared [Editor] Add the possibility to change line opacity in Ink editor 2022-07-27 18:46:25 +02:00
interfaces.js Use ESLint to ensure that exports are sorted alphabetically 2021-01-09 20:37:51 +01:00
license_header_libre.js Use correct case for JavaScript 2022-04-21 23:56:28 +08:00
license_header.js Update the year in the license_header files 2022-01-27 19:24:31 +01:00
pdf.image_decoders.js Fix the Jbig2Image export for the gulp image_decoders build (PR 9729 follow-up, issue 13367) 2021-05-12 19:41:29 +02:00
pdf.js [Editor] Improve a11y for newly added element (#15109) 2022-07-19 18:52:17 +02:00
pdf.sandbox.external.js [JS] Fix several issues found in pdf in #13269 2021-05-04 19:21:51 +02:00
pdf.sandbox.js [JS] Use beforeinput event to trigger a keystroke event in the sandbox 2022-01-23 19:53:01 +01:00
pdf.scripting.js Tweak the pdf.scripting.js bundling, to improve overall consistency 2020-10-25 16:36:56 +01:00
pdf.worker.entry.js Update the year in the license_header files 2022-01-27 19:24:31 +01:00
pdf.worker.js Convert the src/pdf.js and src/pdf.worker.js files to use standard import/export statements 2020-05-20 13:18:23 +02:00
worker_loader.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00