Class DefaultPdfObjectModificationsFinder
java.lang.Object
eu.europa.esig.dss.pdf.modifications.DefaultPdfObjectModificationsFinder
- All Implemented Interfaces:
PdfObjectModificationsFinder
public class DefaultPdfObjectModificationsFinder
extends Object
implements PdfObjectModificationsFinder
Default implementation used to find the differences between two provided PDF revisions.
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating object with default configuration -
Method Summary
Modifier and TypeMethodDescriptionReturns found and categorized object differences between two providedPdfDict
objectsfind
(PdfDocumentReader originalRevisionReader, PdfDocumentReader finalRevisionReader) Returns found and categorized object modifications occurred betweenoriginalRevisionReader
andfinalRevisionReader
.Gets aPdfObjectModificationsFilter
.void
setLaxNumericComparison
(boolean laxNumericComparison) Sets whether an integer number shall be promoted to a real for comparison against a real number.void
setMaximumObjectVerificationDeepness
(int maximumObjectVerificationDeepness) Sets the maximum objects verification deepness of enveloped objects to be compared.void
setPdfObjectModificationsFilter
(PdfObjectModificationsFilter pdfObjectModificationsFilter) Sets thePdfObjectModificationsFilter
used to categorize found differences between PDF objects.
-
Constructor Details
-
DefaultPdfObjectModificationsFinder
public DefaultPdfObjectModificationsFinder()Default constructor instantiating object with default configuration
-
-
Method Details
-
setMaximumObjectVerificationDeepness
public void setMaximumObjectVerificationDeepness(int maximumObjectVerificationDeepness) Sets the maximum objects verification deepness of enveloped objects to be compared. NOTE: In case of large PDFs, a too deep object nesting structure may lead to a StackOverflowError. This parameter is needed to prevent the Error. Please adjust the value in case you system may handle less or more recursion. Default: 500- Parameters:
maximumObjectVerificationDeepness
- defining the maximum recursion deepness on objects analysis
-
setLaxNumericComparison
public void setLaxNumericComparison(boolean laxNumericComparison) Sets whether an integer number shall be promoted to a real for comparison against a real number. Example: when enabled, numbers 612.0 and 612 would be considered as equal. If disabled, the numbers will not be considered as equivalent. Default: TRUE (integer number is promoted to real for comparison against real number)- Parameters:
laxNumericComparison
- whether the integer number shall be promoted to a real for comparison against a real number
-
getPdfObjectModificationsFilter
Gets aPdfObjectModificationsFilter
. If not set, creates a new instance.- Returns:
PdfObjectModificationsFilter
-
setPdfObjectModificationsFilter
public void setPdfObjectModificationsFilter(PdfObjectModificationsFilter pdfObjectModificationsFilter) Sets thePdfObjectModificationsFilter
used to categorize found differences between PDF objects.- Parameters:
pdfObjectModificationsFilter
-PdfObjectModificationsFilter
-
find
public PdfObjectModifications find(PdfDocumentReader originalRevisionReader, PdfDocumentReader finalRevisionReader) Description copied from interface:PdfObjectModificationsFinder
Returns found and categorized object modifications occurred betweenoriginalRevisionReader
andfinalRevisionReader
.- Specified by:
find
in interfacePdfObjectModificationsFinder
- Parameters:
originalRevisionReader
-PdfDocumentReader
representing original (e.g. signed) PDF revisionfinalRevisionReader
-PdfDocumentReader
representing the final PDF document revision- Returns:
PdfObjectModifications
found between two given revisions
-
find
Returns found and categorized object differences between two providedPdfDict
objects- Parameters:
originalRevisionDict
-PdfDict
representing dictionary extracted from original (e.g. signed) PDF revisionfinalRevisionDict
-PdfDict
representing dictionary extracted the final PDF document revision- Returns:
PdfObjectModifications
found between two given PDF dictionaries
-