public class Validator extends NativeObject
| Modifier and Type | Class | Description |
|---|---|---|
class |
Validator.Error |
Report a validation issue found in
analyze(com.pdftools.pdf.Document) or validate(com.pdftools.pdf.Document). |
static interface |
Validator.ErrorListener |
Listener interface for the
Validator.Error event. |
| Constructor | Description |
|---|---|
Validator() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addErrorListener(Validator.ErrorListener listener) |
Add a listener for the
Validator.Error event. |
AnalysisResult |
analyze(Document document) |
Analyze a PDF document in preparation for its conversion to PDF/A.
|
AnalysisResult |
analyze(Document document,
AnalysisOptions options) |
Analyze a PDF document in preparation for its conversion to PDF/A.
|
void |
removeErrorListener(Validator.ErrorListener listener) |
Remove registered listener for the
Validator.Error event. |
ValidationResult |
validate(Document document) |
Validate the standards conformance of a PDF document.
|
ValidationResult |
validate(Document document,
ValidationOptions options) |
Validate the standards conformance of a PDF document.
|
equals, hashCodepublic void addErrorListener(Validator.ErrorListener listener)
Validator.Error event.listener - Listener for the Validator.Error event.
If a listener is added that is already registered, it is ignored.public void removeErrorListener(Validator.ErrorListener listener)
Validator.Error event.listener - Listener for the Validator.Error event that should be removed.
If the listener is not registered, it is ignored.public ValidationResult validate(Document document) throws LicenseException, ProcessingException
document - The document to check the quality ofLicenseException - The license check has failed.ProcessingException - The processing has failed.java.lang.IllegalArgumentException - if document is nullpublic ValidationResult validate(Document document, ValidationOptions options) throws LicenseException, ProcessingException
document - The document to check the quality ofoptions - The options or null for default validation optionsLicenseException - The license check has failed.ProcessingException - The processing has failed.java.lang.IllegalArgumentException - if document is nullpublic AnalysisResult analyze(Document document) throws LicenseException
validate(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 in pdftools.pdfa.conversion.Converter.convert to convert the PDF document to PDF/A.document - The document to analyzeLicenseException - The license check has failed.java.lang.IllegalArgumentException - The conformance of the options argument is not PDF/A.java.lang.IllegalArgumentException - if document is nullpublic AnalysisResult analyze(Document document, AnalysisOptions options) throws LicenseException
validate(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 in pdftools.pdfa.conversion.Converter.convert to convert the PDF document to PDF/A.document - The document to analyzeoptions - The options or null for default analysis optionsLicenseException - The license check has failed.java.lang.IllegalArgumentException - The conformance of the options argument is not PDF/A.java.lang.IllegalArgumentException - if document is null