diff options
Diffstat (limited to 'pdf-as-pdfbox-2/src/main/java/at')
-rw-r--r-- | pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/utils/PdfBoxUtils.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/utils/PdfBoxUtils.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/utils/PdfBoxUtils.java index d072a474..112d9a86 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/utils/PdfBoxUtils.java +++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/utils/PdfBoxUtils.java @@ -18,7 +18,14 @@ public class PdfBoxUtils { throws PdfAsValidationException { AccessPermission accessPermission = doc.getCurrentAccessPermission(); if (doc.isEncrypted() || !accessPermission.isOwnerPermission()) { - if (accessPermission.canModify() || accessPermission.canModifyAnnotations() + //canFillInForm() + //This will tell if the user can fill in interactive form fields (including signature fields) even if + // canModifyAnnotations() returns false. + + //canModifyAnnotations() + //This will tell if the user can add or modify text annotations and fill in interactive forms fields and, if + // canModify() returns true, create or modify interactive form fields (including signature fields). + if ((accessPermission.canModify() && accessPermission.canModifyAnnotations()) || accessPermission.canFillInForm()) { logger.debug("Document is protected, but Signing is allowed"); |