setasign\SetaPDF2\Core\Xmp

PdfA A helper class to handle PDF/A metadata

File: /SetaPDF v2/Core/Xmp/PdfA.php
Old class name (alias): \SetaPDF_Core_XmpHelper_PdfA

Class hierarchy

Summary

Static Methods

addSchemaExtension()

public static PdfA::addSchemaExtension (
\setasign\SetaPDF2\Core\Document $document,
string $propertyName,
string $propertyCategory,
string $propertyDescription,
string $propertyValueType,
string $namespaceURI,
?string $nsPrefix = null,
?string $schemaDescription = null
): bool

Add an XMP Extension Schema entry to the document metadata.

If a schema with the $namespace value already exists, the new entry will be added to the found entry.

Parameters
$document : \setasign\SetaPDF2\Core\Document
 
$propertyName : string
 
$propertyCategory : string
 
$propertyDescription : string
 
$propertyValueType : string
 
$namespaceURI : string
 
$nsPrefix : ?string
 
$schemaDescription : ?string
 
Exceptions

Throws \DOMException

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

getPartAndConformance()

public static PdfA::getPartAndConformance (): array{0: string|false, 1: string|false}

Get the PDF/A part and conformance from a document instance.

Parameters
$document : \setasign\SetaPDF2\Core\Document
 
Return Values

Key 0 holds the part, key 1 the conformance

Exceptions

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

update()

public static PdfA::update (
\setasign\SetaPDF2\Core\Document $document,
string $part,
string $conformance
): void

Updates the documents metadata package to PDF/A.

Parameters
$document : \setasign\SetaPDF2\Core\Document
 
$part : string

The PDF/A norm (e.g. 1, 2, or 3)

$conformance : string

The conformance level (e.g. B, U, or A)

Exceptions

Throws \DOMException

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception