pdftools_sdk.pdf_a.validation.validator
Classes
The class to validate the standard conformance of documents |
- class pdftools_sdk.pdf_a.validation.validator.Validator[source]
Bases:
_NativeObjectThe class to validate the standard conformance of documents
- validate(document: Document, options: ValidationOptions | None = None) ValidationResult[source]
Validate the standards conformance of a PDF document.
- Parameters:
document (Document) – The document to check the quality of
options (Optional[ValidationOptions]) – The options or None for default validation options
- Returns:
The result of the validation
- Return type:
- Raises:
pdftools_sdk.license_error.LicenseError – The license check has failed.
pdftools_sdk.processing_error.ProcessingError – The processing has failed.
- analyze(document: Document, options: AnalysisOptions | None = None) AnalysisResult[source]
Analyze a PDF document in preparation for its conversion to PDF/A.
This method validates the document’s standards conformance like pdftools_sdk.pdf_a.validation.validator.Validator.validate. In addition to that, certain additional checks can be performed. However, the main difference is that the analysis result can be used in pdftools_sdk.pdf_a.conversion.converter.Converter.convert to convert the PDF document to PDF/A.
- Parameters:
document (Document) – The document to analyze
options (Optional[AnalysisOptions]) – The options or None for default analysis options
- Returns:
The result of the analysis
- Return type:
- Raises:
pdftools_sdk.license_error.LicenseError – The license check has failed.
ValueError – The conformance of the options argument is not PDF/A.