API reference / Quittio \ Core \ Validation \ Drivers
VeraPdfValidator
final class in quittio/core · implements ValidationDriver
Quittio\Core\Validation\Drivers\VeraPdfValidator · Source
PDF/A conformance check (level L6) with veraPDF.
Modes:
- cli: a locally installed veraPDF binary,
- docker: the official image (verapdf/cli), the PDF is passed via stdin.
Constants#
| Constant | Value | Description |
|---|---|---|
MODE_CLI | 'cli' | |
MODE_DOCKER | 'docker' |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->levels() | |
->name() | |
::parse() | Converts a veraPDF machine readable report (MRR) into messages. |
->supports() | |
->validate() | |
->validatePdf() |
__construct()#
public function __construct(
string $mode = self::MODE_DOCKER,
string $binary = 'verapdf',
string $image = 'verapdf/cli',
string $docker = 'docker',
string $flavour = '3b',
int $timeout = 120,
bool $failOnUnavailable = true,
int $maxFailuresDisplayed = 5,
(Closure(list<string>, string, int): array{exitCode: int, stdout: string, stderr: string})|null $runner = null,
)| Parameter | Type | Description |
|---|---|---|
$mode | string = self::MODE_DOCKER | |
$binary | string = 'verapdf' | |
$image | string = 'verapdf/cli' | |
$docker | string = 'docker' | |
$flavour | string = '3b' | |
$timeout | int = 120 | |
$failOnUnavailable | bool = true | |
$maxFailuresDisplayed | int = 5 | |
$runner | (Closure(list<string>, string, int): array{exitCode: int, stdout: string, stderr: string})|null = null |
levels()#
public function levels(): array- Returns
array
name()#
public function name(): string- Returns
string
parse()#
public static function parse(string $report): list<ValidationMessage>Converts a veraPDF machine readable report (MRR) into messages.
| Parameter | Type | Description |
|---|---|---|
$report | string |
- Returns
list<ValidationMessage>
supports()#
public function supports(ValidationSubject $subject): bool| Parameter | Type | Description |
|---|---|---|
$subject | ValidationSubject |
- Returns
bool
validate()#
public function validate(ValidationSubject $subject): ValidationResult| Parameter | Type | Description |
|---|---|---|
$subject | ValidationSubject |
- Returns
ValidationResult
validatePdf()#
public function validatePdf(string $pdf): list<ValidationMessage>| Parameter | Type | Description |
|---|---|---|
$pdf | string |
- Returns
list<ValidationMessage>