Package com.pdftools.pdfa.validation
Class Validator
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.pdfa.validation.Validator
-
public class Validator extends NativeObject
The class to validate the standard conformance of documents
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classValidator.ErrorReport a validation issue found inanalyze(com.pdftools.pdf.Document)orvalidate(com.pdftools.pdf.Document).static interfaceValidator.ErrorListenerListener interface for theValidator.Errorevent.
-
Constructor Summary
Constructors Constructor Description Validator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddErrorListener(Validator.ErrorListener listener)Add a listener for theValidator.Errorevent.AnalysisResultanalyze(Document document)Analyze a PDF document in preparation for its conversion to PDF/A.AnalysisResultanalyze(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.ValidationResultvalidate(Document document)Validate the standards conformance of a PDF document.ValidationResultvalidate(Document document, ValidationOptions options)Validate the standards conformance of a PDF document.-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
addErrorListener
public void addErrorListener(Validator.ErrorListener listener)
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
public void removeErrorListener(Validator.ErrorListener listener)
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
public ValidationResult validate(Document document) throws LicenseException, ProcessingException
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.java.lang.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.java.lang.IllegalArgumentException- ifdocumentisnull
-
analyze
public AnalysisResult analyze(Document document) throws LicenseException
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.java.lang.IllegalArgumentException- The conformance of theoptionsargument is not PDF/A.java.lang.IllegalArgumentException- ifdocumentisnull
-
analyze
public AnalysisResult analyze(Document document, AnalysisOptions options) throws LicenseException
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.java.lang.IllegalArgumentException- The conformance of theoptionsargument is not PDF/A.java.lang.IllegalArgumentException- ifdocumentisnull
-
-