Metadata & Validation
When using strict PDF/A profiles (Level A or UA), specific metadata fields become mandatory.
Mandatory Fields (E003)
If you select a strict profile but fail to provide required metadata, the system will verify compliance.
| Profile | Required Fields | Behavior on Missing |
|---|---|---|
| PDF/A-UA1 | title, language | E003 Error if title is missing. |
| PDF/A-1a/2a/3a | language | Auto-detected (see below). |
WARNING
E003 Error: A large white box with red text will appear on the PDF listing missing fields (e.g., "Missing: title").
Language Auto-Detection
The metadata_language field is mandatory for accessible PDFs (Level A/UA). To simplify integration, xPdf employs a Smart Detection Policy:
- Explicit: If you provide
metadata_language(e.g.,"en","zh"), it is used. - Auto-Detect: If missing, we scan the document content:
- Chinese characters ->
zh - Japanese scripts ->
ja - (Supports CJK, Arabic, Hebrew, etc.)
- Chinese characters ->
- Fallback: If detection fails (e.g., only numbers/barcodes), it defaults to
"und"(Undetermined).
NOTE
This means you generally do not need to manually set metadata_language to avoid errors. The system handles compliance automatically.