/** * Computes the revision version of the StandardSecurityHandler to * use regarding the version number and the permissions bits set. * See PDF Spec 1.6 p98 * * @param version The version number. * * @return The computed revision number. */ private int computeRevisionNumber(int version) { if(version < 2 && !policy.getPermissions().hasAnyRevision3PermissionSet()) { return 2; } if (version == 5) { // note about revision 5: "Shall not be used. This value was used by a deprecated Adobe extension." return 6; } if (version == 4) { return 4; } if ( version == 2 || version == 3 || policy.getPermissions().hasAnyRevision3PermissionSet()) { return 3; } return 4; }
int permissionInt = policy.getPermissions().getPermissionBytes();
/** * Computes the revision version of the StandardSecurityHandler to * use regarding the version number and the permissions bits set. * See PDF Spec 1.6 p98 * * @param version The version number. * * @return The computed revision number. */ private int computeRevisionNumber(int version) { if(version < 2 && !policy.getPermissions().hasAnyRevision3PermissionSet()) { return 2; } if (version == 5) { // note about revision 5: "Shall not be used. This value was used by a deprecated Adobe extension." return 6; } if (version == 4) { return 4; } if ( version == 2 || version == 3 || policy.getPermissions().hasAnyRevision3PermissionSet()) { return 3; } return 4; }
/** * Computes the revision version of the StandardSecurityHandler to * use regarding the version number and the permissions bits set. * See PDF Spec 1.6 p98 * * @param version The version number. * * @return The computed revision number. */ private int computeRevisionNumber(int version) { if(version < 2 && !policy.getPermissions().hasAnyRevision3PermissionSet()) { return 2; } if (version == 5) { // note about revision 5: "Shall not be used. This value was used by a deprecated Adobe extension." return 6; } if (version == 4) { return 4; } if ( version == 2 || version == 3 || policy.getPermissions().hasAnyRevision3PermissionSet()) { return 3; } return 4; }
int permissionInt = policy.getPermissions().getPermissionBytes();
int permissionInt = policy.getPermissions().getPermissionBytes();