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
ConstructorsConstructorDescriptionDefault constructor instantiating object with default configuration -
Method Summary
Modifier and TypeMethodDescriptionReturns found and categorized object differences between two providedPdfDictobjectsfind(PdfDocumentReader originalRevisionReader, PdfDocumentReader finalRevisionReader) Returns found and categorized object modifications occurred betweenoriginalRevisionReaderandfinalRevisionReader.Gets aPdfObjectModificationsFilter.voidsetLaxNumericComparison(boolean laxNumericComparison) Sets whether an integer number shall be promoted to a real for comparison against a real number.voidsetMaximumObjectVerificationDeepness(int maximumObjectVerificationDeepness) Sets the maximum objects verification deepness of enveloped objects to be compared.voidsetPdfObjectModificationsFilter(PdfObjectModificationsFilter pdfObjectModificationsFilter) Sets thePdfObjectModificationsFilterused 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 thePdfObjectModificationsFilterused to categorize found differences between PDF objects.- Parameters:
pdfObjectModificationsFilter-PdfObjectModificationsFilter
-
find
public PdfObjectModifications find(PdfDocumentReader originalRevisionReader, PdfDocumentReader finalRevisionReader) Description copied from interface:PdfObjectModificationsFinderReturns found and categorized object modifications occurred betweenoriginalRevisionReaderandfinalRevisionReader.- Specified by:
findin interfacePdfObjectModificationsFinder- Parameters:
originalRevisionReader-PdfDocumentReaderrepresenting original (e.g. signed) PDF revisionfinalRevisionReader-PdfDocumentReaderrepresenting the final PDF document revision- Returns:
PdfObjectModificationsfound between two given revisions
-
find
Returns found and categorized object differences between two providedPdfDictobjects- Parameters:
originalRevisionDict-PdfDictrepresenting dictionary extracted from original (e.g. signed) PDF revisionfinalRevisionDict-PdfDictrepresenting dictionary extracted the final PDF document revision- Returns:
PdfObjectModificationsfound between two given PDF dictionaries
-