1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

JS -- hidden annotations must be built in case a script show them

* in some pdf, there are actions with "event.source.hidden = ..."
 * in order to handle visibility when printing, annotationStorage is extended to store multiple properties (value, hidden, editable, ...)
This commit is contained in:
Calixte Denizet 2020-11-03 16:04:08 +01:00
parent 1c17e078ec
commit b11592a756
9 changed files with 210 additions and 100 deletions

View file

@ -347,7 +347,10 @@ class Page {
// is resolved with the complete operator list for a single annotation.
const opListPromises = [];
for (const annotation of annotations) {
if (isAnnotationRenderable(annotation, intent)) {
if (
isAnnotationRenderable(annotation, intent) &&
!annotation.isHidden(annotationStorage)
) {
opListPromises.push(
annotation
.getOperatorList(