Skip to content

Commit

Permalink
Merge pull request #849 from nextcloud/show-forms-as-read-only
Browse files Browse the repository at this point in the history
[stable27] Show forms as read only
  • Loading branch information
szaimen authored Nov 5, 2023
2 parents d42f3d0 + 86bad78 commit 5aa3744
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/files_pdfviewer-workersrc.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-workersrc.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/workersrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function initializeCustomPDFViewerApplication() {
PDFViewerApplicationOptions.set('cMapUrl', head.getAttribute('data-cmapurl'))
PDFViewerApplicationOptions.set('enablePermissions', true)
PDFViewerApplicationOptions.set('imageResourcesPath', './js/pdfjs/web/images/')
// AnnotationMode.ENABLE value is 1 in PDF.js, which shows forms, but does
// not allow to interact with them
PDFViewerApplicationOptions.set('annotationMode', 1)

if (canDownload === '0') {
const pdfViewer = window.document.querySelector('.pdfViewer')
Expand Down

0 comments on commit 5aa3744

Please sign in to comment.