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
Fix disabled annotation edition in view only files
When a PDF file was shared without edit permissions the annotation
editor buttons were hidden in the toolbar. Besides being a dirty trick,
it only prevented creating new annotations, but not editing existing
ones. Now the parameter "annotationEditorMode" of PDF.js set to
"AnnotationEditorType.DISABLE" is used instead, which properly disables
editing annotations and also takes care of removing the buttons from the
toolbar if needed.
Note that the editor mode separator is no longer hidden; it was hidden
back in the day when edition was not supported yet in the PDF viewer,
and once edition was added it should have been shown whenever the editor
buttons were shown, but it was not the case. Now it is shown by default
and hidden as needed by PDF.js itself when annotation edition is
disabled.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
0 commit comments