Interface PDFAValidator

  • All Superinterfaces:
    AutoCloseable, Closeable, Component
    All Known Implementing Classes:
    BaseValidator

    public interface PDFAValidator
    extends Component
    A PDFAValidator performs a series of checks on PDF/A documents to verify that the document conforms to a specific PDF/A flavour. Note that the interface makes no provision for configuration of a validator instance. This is left to the implementer although the veraPDF library API provides a Validators class. This is designed to allow immutable validator instances, meaning there is no methods provided to change the ValidationProfile, or the pre-configured settings.
    Author:
    Maksim Bezrukov
    • Method Detail

      • getProfile

        ValidationProfile getProfile()
        Returns the complete ValidationProfile enforced by this PDFAValidator.
        Returns:
        this PDFAValidator instance's ValiationProfile
      • validate

        ValidationResult validate​(PDFAParser toValidate)
                           throws ValidationException
        This method validates an InputStream, presumably believed to be a PDF/A document of a specific flavour that matches the ValidationProfile supported by the PDFAValidator instance.
        Parameters:
        toValidate - a InputStream to be validated
        Returns:
        a ValidationResult containing the result of valdiation and details of failed checks and possibly passed checks, dependent upon configuration.
        Throws:
        ValidationException
        ModelParsingException
        IllegalArgumentException - if the toValidate parameter is null PDFAValidationException if the validation process fails