Package com.pdftools.pdfa.validation
Class Validator
java.lang.Object
com.pdftools.internal.NativeBase
com.pdftools.internal.NativeObject
com.pdftools.pdfa.validation.Validator
The class to validate the standard conformance of documents
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassReport a validation issue found inanalyze(com.pdftools.pdf.Document)orvalidate(com.pdftools.pdf.Document).static interfaceListener interface for theValidator.Errorevent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrorListener(Validator.ErrorListener listener) Add a listener for theValidator.Errorevent.Analyze a PDF document in preparation for its conversion to PDF/A.analyze(Document document, AnalysisOptions options) Analyze a PDF document in preparation for its conversion to PDF/A.voidremoveErrorListener(Validator.ErrorListener listener) Remove registered listener for theValidator.Errorevent.Validate the standards conformance of a PDF document.validate(Document document, ValidationOptions options) Validate the standards conformance of a PDF document.Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Constructor Details
-
Validator
public Validator()
-
-
Method Details
-
addErrorListener
Add a listener for theValidator.Errorevent.- Parameters:
listener- Listener for theValidator.Errorevent. If a listener is added that is already registered, it is ignored.
-
removeErrorListener
Remove registered listener for theValidator.Errorevent.- Parameters:
listener- Listener for theValidator.Errorevent that should be removed. If the listener is not registered, it is ignored.
-
validate
Validate the standards conformance of a PDF document.
- Parameters:
document- The document to check the quality of- Returns:
- The result of the validation
- Throws:
LicenseException- The license check has failed.ProcessingException- The processing has failed.IllegalArgumentException- ifdocumentisnull
-
validate
public ValidationResult validate(Document document, ValidationOptions options) throws LicenseException, ProcessingException Validate the standards conformance of a PDF document.
- Parameters:
document- The document to check the quality ofoptions- The options ornullfor default validation options- Returns:
- The result of the validation
- Throws:
LicenseException- The license check has failed.ProcessingException- The processing has failed.IllegalArgumentException- ifdocumentisnull
-
analyze
Analyze a PDF document in preparation for its conversion to PDF/A.
This method validates the document's standards conformance likevalidate(com.pdftools.pdf.Document). In addition to that, certain additional checks can be performed. However, the main difference is that the analysis result can be used inpdftools.pdfa.conversion.Converter.convertto convert the PDF document to PDF/A.- Parameters:
document- The document to analyze- Returns:
- The result of the analysis
- Throws:
LicenseException- The license check has failed.IllegalArgumentException- The conformance of theoptionsargument is not PDF/A.IllegalArgumentException- ifdocumentisnull
-
analyze
Analyze a PDF document in preparation for its conversion to PDF/A.
This method validates the document's standards conformance likevalidate(com.pdftools.pdf.Document). In addition to that, certain additional checks can be performed. However, the main difference is that the analysis result can be used inpdftools.pdfa.conversion.Converter.convertto convert the PDF document to PDF/A.- Parameters:
document- The document to analyzeoptions- The options ornullfor default analysis options- Returns:
- The result of the analysis
- Throws:
LicenseException- The license check has failed.IllegalArgumentException- The conformance of theoptionsargument is not PDF/A.IllegalArgumentException- ifdocumentisnull
-