Package eu.europa.esig.dss.pdf
Class PdfPermissionsChecker
java.lang.Object
eu.europa.esig.dss.pdf.PdfPermissionsChecker
This class is used to verify permissions of a PDF document and to check whether modifications are allowed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckDocumentPermissions(PdfDocumentReader documentReader, SignatureFieldParameters fieldParameters) This method checks if the document has the necessary permissions for the signature operationvoidcheckSignatureRestrictionDictionaries(PdfDocumentReader documentReader, SignatureFieldParameters fieldParameters) This method verifies whether a new signature is permittedvoidsetAlertOnForbiddenSignatureCreation(StatusAlert alertOnForbiddenSignatureCreation) Sets a behavior to follow when creating a new signature in a document that forbids creation of new signatures Default : ExceptionOnStatusAlert - throw the exception
-
Constructor Details
-
PdfPermissionsChecker
public PdfPermissionsChecker()Default constructor to instantiate the checker
-
-
Method Details
-
setAlertOnForbiddenSignatureCreation
Sets a behavior to follow when creating a new signature in a document that forbids creation of new signatures Default : ExceptionOnStatusAlert - throw the exception- Parameters:
alertOnForbiddenSignatureCreation-StatusAlertto execute
-
checkDocumentPermissions
public void checkDocumentPermissions(PdfDocumentReader documentReader, SignatureFieldParameters fieldParameters) This method checks if the document has the necessary permissions for the signature operation- Parameters:
documentReader-PdfDocumentReaderfieldParameters-SignatureFieldParameters
-
checkSignatureRestrictionDictionaries
public void checkSignatureRestrictionDictionaries(PdfDocumentReader documentReader, SignatureFieldParameters fieldParameters) This method verifies whether a new signature is permitted- Parameters:
documentReader-PdfDocumentReaderfieldParameters-SignatureFieldParameters
-