Skip to content

Class ZugferdPdfValidator

ruff edited this page Dec 28, 2024 · 1 revision

Summary

Class representing the validator against PDF files using VeraPDF.

This class requires a JAVA running setup

Methods

fromFile [static]

Summary

Create a ZugferdPdfValidator-Instance by an existing PDF-File

Signature

public static function fromFile(string $pdfFilename): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
pdfFilename string

Returns

Returns a value of type \ZugferdPdfValidator

fromContent [static]

Summary

Create a ZugferdPdfValidator-Instance by a given content string

Signature

public static function fromContent(string $pdfContent): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
pdfContent string

Returns

Returns a value of type \ZugferdPdfValidator

setPdfContent

Summary

Set the PDF content to validate

Signature

public function setPdfContent(string $pdfContent): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
pdfContent string

Returns

Returns a value of type \ZugferdPdfValidator

setBaseDirectory

Summary

Setup the base directory. In the base directory all files will be downloaded
and created

Signature

public function setBaseDirectory(string $newBaseDirectory): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
newBaseDirectory string

Returns

Returns a value of type \ZugferdPdfValidator

setValidatorDownloadUrl

Summary

Setup the VeraPDF validator application download url

Signature

public function setValidatorDownloadUrl(string $newValidatorDownloadUrl): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorDownloadUrl string

Returns

Returns a value of type \ZugferdPdfValidator

setValidatorAppZipFilename

Summary

Set the filename of the ZIP file which contains the validation application

Signature

public function setValidatorAppZipFilename(string $newValidatorAppZipFilename): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorAppZipFilename string

Returns

Returns a value of type \ZugferdPdfValidator

setValidatorRuleset

Summary

Set the Ruleset to use for validation.

Allowed values are 0, 1a, 1b, 2a, 2b, 2u, 3a, 3b, 3u, 4, 4f, 4e, ua1, ua2

Signature

public function setValidatorRuleset(string $newVlidatorRuleset): \ZugferdPdfValidator
{
}

Parameters

Name Type Allows Null Description
newVlidatorRuleset string

Returns

Returns a value of type \ZugferdPdfValidator

disableCleanup

Summary

Disable cleanup base directory

Signature

public function disableCleanup(): \ZugferdPdfValidator
{
}

Returns

Returns a value of type \ZugferdPdfValidator

enableCleanup

Summary

Enable cleanup base directory

Signature

public function enableCleanup(): \ZugferdPdfValidator
{
}

Returns

Returns a value of type \ZugferdPdfValidator

validate

Summary

Perform validation

Signature

public function validate(): \ZugferdPdfValidator
{
}

Returns

Returns a value of type \ZugferdPdfValidator

getValidationErrors

Summary

Returns an array of all validation errors

Signature

public function getValidationErrors(): array
{
}

Returns

Returns a value of type array

hasNoValidationErrors

Summary

Returns true if no validation errors are present otherwise false

Signature

public function hasNoValidationErrors(): bool
{
}

Returns

Returns a value of type bool

hasValidationErrors

Summary

Returns true if validation errors are present otherwise false

Signature

public function hasValidationErrors(): bool
{
}

Returns

Returns a value of type bool

getValidationWarnings

Summary

Returns an array of all validation warnings

Signature

public function getValidationWarnings(): array
{
}

Returns

Returns a value of type array

hasNoValidationWarnings

Summary

Returns true if no validation warnings are present otherwise false

Signature

public function hasNoValidationWarnings(): bool
{
}

Returns

Returns a value of type bool

hasValidationWarnings

Summary

Returns true if validation warnings are present otherwise false

Signature

public function hasValidationWarnings(): bool
{
}

Returns

Returns a value of type bool

getValidationInformation

Summary

Returns an array of all validation information

Signature

public function getValidationInformation(): array
{
}

Returns

Returns a value of type array

hasNoValidationInformation

Summary

Returns true if no validation information are present otherwise false

Signature

public function hasNoValidationInformation(): bool
{
}

Returns

Returns a value of type bool

hasValidationInformation

Summary

Returns true if validation Information are present otherwise false

Signature

public function hasValidationInformation(): bool
{
}

Returns

Returns a value of type bool

getProcessErrors

Summary

Return an array of all internal errors (such as download error or system exceptions)

Signature

public function getProcessErrors(): array
{
}

Returns

Returns a value of type array

hasNoProcessErrors

Summary

Returns true if there are no system errors (e.g. exceptions before the validation app was called)

Signature

public function hasNoProcessErrors(): bool
{
}

Returns

Returns a value of type bool

hasProcessErrors

Summary

Returns true if there are any system errors (e.g. exceptions before the validation app was called)

Signature

public function hasProcessErrors(): bool
{
}

Returns

Returns a value of type bool

getProcessOutput

Summary

Returns an array of all messages from process system (calling external applications)

Signature

public function getProcessOutput(): array
{
}

Returns

Returns a value of type array

Clone this wiki locally