Skip to content

modern-pdf-lib


modern-pdf-lib / validatePdfA

Function: validatePdfA()

validatePdfA(pdfBytes, level): PdfAValidationResult

Defined in: src/compliance/pdfA.ts:95

Validate a PDF against a specific PDF/A conformance level.

This performs structural checks on the raw PDF bytes. It does NOT fully render or deeply parse the PDF — it checks for the presence or absence of features that PDF/A requires or forbids.

Parameters

pdfBytes

Uint8Array

The raw PDF bytes.

level

PdfALevel

The target PDF/A conformance level.

Returns

PdfAValidationResult

A validation result with any issues found.

Released under the MIT License.