sempdf
sempdf v1.9.1Functions

Function: validateWithVeraPdf()

sempdf v1.9.1


sempdf / validateWithVeraPdf

function validateWithVeraPdf(bytes, options?): Promise<VeraPdfValidateResult>;

Defined in: src/internal/verapdf-validate.ts:97

Validates PDF bytes with veraPDF when it is installed, falling back to the supplied custom checker issues otherwise.

veraPDF is detected at call time by attempting to spawn its executable. If it is missing (ENOENT) the result has source: "custom" and available: false. This function only runs under Node — it lazily imports node:* modules so browser bundles never reach this code.

Parameters

ParameterTypeDescription
bytesUint8ArrayThe serialized PDF document (e.g. doc.toUint8Array()).
optionsVeraPdfValidateOptionsFlavour selection, executable path, and fallback issues.

Returns

Promise<VeraPdfValidateResult>

The validation result, drawn from veraPDF or the custom checker.

On this page