/** * Indicates if any revision 3 access permission is set or not. * * @return true if any revision 3 access permission is set */ protected boolean hasAnyRevision3PermissionSet() { if (canFillInForm()) { return true; } if (canExtractForAccessibility()) { return true; } if (canAssembleDocument()) { return true; } return canPrintDegraded(); } }
/** * This will tell if the access permission corresponds to owner * access permission (no restriction). * * @return true if the access permission does not restrict the use of the document */ public boolean isOwnerPermission() { return (this.canAssembleDocument() && this.canExtractContent() && this.canExtractForAccessibility() && this.canFillInForm() && this.canModify() && this.canModifyAnnotations() && this.canPrint() && this.canPrintDegraded() ); }
@Override Object[][] getFlagBits() { AccessPermission ap = new AccessPermission(encryptDictionary.getInt(COSName.P)); return new Object[][]{ new Object[]{3, "can print", ap.canPrint()}, new Object[]{4, "can modify", ap.canModify()}, new Object[]{5, "can extract content", ap.canExtractContent()}, new Object[]{6, "can modify annotations", ap.canModifyAnnotations()}, new Object[]{9, "can fill in form fields", ap.canFillInForm()}, new Object[]{10, "can extract for accessibility", ap.canExtractForAccessibility()}, new Object[]{11, "can assemble document", ap.canAssembleDocument()}, new Object[]{12, "can print degraded", ap.canPrintDegraded()}, }; } }
Boolean.toString(ap.canPrint())); metadata.set(AccessPermissions.CAN_PRINT_DEGRADED, Boolean.toString(ap.canPrintDegraded()));
permissions.canExtractForAccessibility())); cachedMap.put("Can Assemble", String.valueOf(permissions.canAssembleDocument())); cachedMap.put("Can Print Degraded", String.valueOf(permissions.canPrintDegraded()));
/** * Indicates if any revision 3 access permission is set or not. * * @return true if any revision 3 access permission is set */ protected boolean hasAnyRevision3PermissionSet() { if (canFillInForm()) { return true; } if (canExtractForAccessibility()) { return true; } if (canAssembleDocument()) { return true; } return canPrintDegraded(); } }
/** * Indicates if any revision 3 access permission is set or not. * * @return true if any revision 3 access permission is set */ protected boolean hasAnyRevision3PermissionSet() { if (canFillInForm()) { return true; } if (canExtractForAccessibility()) { return true; } if (canAssembleDocument()) { return true; } return canPrintDegraded(); } }
AccessPermission accessPermissions = new AccessPermission(encryption.getPermissions()); this.isPrintAllowed = accessPermissions.canPrint(); this.isPrintDegradedAllowed = accessPermissions.canPrintDegraded(); this.isChangesAllowed = accessPermissions.canModify(); this.isModifyAnnotationsAllowed = accessPermissions.canModifyAnnotations();
/** * This will tell if the access permission corresponds to owner * access permission (no restriction). * * @return true if the access permission does not restrict the use of the document */ public boolean isOwnerPermission() { return (this.canAssembleDocument() && this.canExtractContent() && this.canExtractForAccessibility() && this.canFillInForm() && this.canModify() && this.canModifyAnnotations() && this.canPrint() && this.canPrintDegraded() ); }
/** * This will tell if the access permission corresponds to owner * access permission (no restriction). * * @return true if the access permission does not restrict the use of the document */ public boolean isOwnerPermission() { return (this.canAssembleDocument() && this.canExtractContent() && this.canExtractForAccessibility() && this.canFillInForm() && this.canModify() && this.canModifyAnnotations() && this.canPrint() && this.canPrintDegraded() ); }
Boolean.toString(ap.canPrint())); metadata.set(AccessPermissions.CAN_PRINT_DEGRADED, Boolean.toString(ap.canPrintDegraded()));
Boolean.toString(ap.canPrint())); metadata.set(AccessPermissions.CAN_PRINT_DEGRADED, Boolean.toString(ap.canPrintDegraded()));
Boolean.toString(ap.canPrint())); metadata.set(AccessPermissions.CAN_PRINT_DEGRADED, Boolean.toString(ap.canPrintDegraded()));