SetaPDF_Core_Zugferd A helper class to deal with ZUGFeRD (>= 2.3) documents

File: /SetaPDF v2/Core/Zugferd.php

Class hierarchy

Summary

Static Methods

build()

public static SetaPDF_Core_Zugferd::build (
SetaPDF_Core_Document $document, string $zugferdXml
): void

Adds the ZUGFeRD XML (>= 2.3) to a PDF/A-3 conforming PDF document instance and adds all relevant metadata information.

Parameters
$document : SetaPDF_Core_Document
 
$zugferdXml : string
 
Exceptions

Throws SetaPDF_Core_DataStructure_Tree_KeyAlreadyExistsException

Throws SetaPDF_Core_Reader_Exception

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

Throws Exception

extract()

public static SetaPDF_Core_Zugferd::extract (): false|string

Extract the ZUGFeRD XML (>= 2.3) from a document instance.

Parameters
$document : SetaPDF_Core_Document
 
Return Values

If the document is not a ZUGFeRD document, false will be returned. Otherwise, the XML of the embedded file.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Exception

Throws SetaPDF_Exception_NotImplemented