Package eu.europa.esig.dss.diagnostic
Class PDFRevisionWrapper
java.lang.Object
eu.europa.esig.dss.diagnostic.PDFRevisionWrapper
Contains user-friendly methods to extract information from an
eu.europa.esig.dss.diagnostic.jaxb.XmlPDFRevision
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if any visual modifications detected in the PDFboolean
This method checks whether object modifications are present after the current PDF revisionsReturns the PDF signature dictionary /ContactInfo valueReturns aCertificationPermission
value of a /DocMDP dictionary, when presentReturns a /FieldMDP dictionary content, when presentReturns the PDF signature dictionary /Filter valueReturns the first signature field nameReturns the PDF signature dictionary /Location valueThis method returns a list of field names modified after the current signature's revisionReturns a list of changes occurred in a PDF after the current signature's revision associated with annotation(s) modificationReturns a list of PDF annotation overlap concerned pagesReturns a list of changes occurred in a PDF after the current signature's revision associated with a signature/document extensionReturns a list of pages missing/added to the final revision in a comparison with a signed oneReturns a list of changes occurred in a PDF after the current signature's revision associated with a signature creation, form fillingReturns a list of undefined changes occurred in a PDF after the current signature's revisionReturns a list of PDF visual difference concerned pagesReturns the PDF signature dictionary /Reason valueReturns a /SigFieldLock dictionary, when presentReturns the PDF signature dictionary /ByteRange valueReturns the PDF signature dictionary /Type valueReturns a list of signature field names, where the signature is referenced fromReturns the signer's nameReturns the PDF signature dictionary /SubFilter valueboolean
This method returns whether the PDF signature dictionary is consistent across PDF revisions.boolean
This method returns whether the PDF signature dictionary /ByteRange is found and valid
-
Constructor Details
-
PDFRevisionWrapper
Default constructor- Parameters:
pdfRevision
-XmlPDFRevision
-
-
Method Details
-
arePdfModificationsDetected
public boolean arePdfModificationsDetected()Checks if any visual modifications detected in the PDF- Returns:
- TRUE if modifications detected in a PDF, FALSE otherwise
-
getPdfAnnotationsOverlapConcernedPages
Returns a list of PDF annotation overlap concerned pages- Returns:
- a list of page numbers
-
getPdfVisualDifferenceConcernedPages
Returns a list of PDF visual difference concerned pages- Returns:
- a list of page numbers
-
getPdfPageDifferenceConcernedPages
Returns a list of pages missing/added to the final revision in a comparison with a signed one- Returns:
- a list of page numbers
-
arePdfObjectModificationsDetected
public boolean arePdfObjectModificationsDetected()This method checks whether object modifications are present after the current PDF revisions- Returns:
- TRUE if PDF has been modified, FALSE otherwise
-
getPdfExtensionChanges
Returns a list of changes occurred in a PDF after the current signature's revision associated with a signature/document extension- Returns:
- a list of
XmlObjectModification
s
-
getPdfSignatureOrFormFillChanges
Returns a list of changes occurred in a PDF after the current signature's revision associated with a signature creation, form filling- Returns:
- a list of
XmlObjectModification
s
-
getPdfAnnotationChanges
Returns a list of changes occurred in a PDF after the current signature's revision associated with annotation(s) modification- Returns:
- a list of
XmlObjectModification
s
-
getPdfUndefinedChanges
Returns a list of undefined changes occurred in a PDF after the current signature's revision- Returns:
- a list of
XmlObjectModification
s
-
getModifiedFieldNames
This method returns a list of field names modified after the current signature's revision- Returns:
- a list of
String
s
-
getFirstFieldName
Returns the first signature field name- Returns:
String
field name
-
getSignatureFieldNames
Returns a list of signature field names, where the signature is referenced from- Returns:
- a list of
String
signature field names
-
getSignerName
Returns the signer's name- Returns:
String
-
getSignatureDictionaryType
Returns the PDF signature dictionary /Type value- Returns:
String
-
getFilter
Returns the PDF signature dictionary /Filter value- Returns:
String
-
getSubFilter
Returns the PDF signature dictionary /SubFilter value- Returns:
String
-
getContactInfo
Returns the PDF signature dictionary /ContactInfo value- Returns:
String
-
getLocation
Returns the PDF signature dictionary /Location value- Returns:
String
-
getReason
Returns the PDF signature dictionary /Reason value- Returns:
String
-
getSignatureByteRange
Returns the PDF signature dictionary /ByteRange value- Returns:
- byte range
-
isSignatureByteRangeValid
public boolean isSignatureByteRangeValid()This method returns whether the PDF signature dictionary /ByteRange is found and valid- Returns:
- TRUE if the /ByteRange is valid, FALSE otherwise
-
isPdfSignatureDictionaryConsistent
public boolean isPdfSignatureDictionaryConsistent()This method returns whether the PDF signature dictionary is consistent across PDF revisions.- Returns:
- TRUE if the signature dictionary is consistent, FALSE otherwise
-
getDocMDPPermissions
Returns aCertificationPermission
value of a /DocMDP dictionary, when present- Returns:
CertificationPermission
-
getFieldMDP
Returns a /FieldMDP dictionary content, when present- Returns:
XmlPDFLockDictionary
-
getSigFieldLock
Returns a /SigFieldLock dictionary, when present- Returns:
XmlPDFLockDictionary
-