setasign\SetaPDF2\Core

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

File: /SetaPDF v2/Core/Zugferd.php
Old class name (alias): \SetaPDF_Core_Zugferd

Class hierarchy

Summary

Static Methods

build()

public static 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 DataStructure\Tree\KeyAlreadyExistsException

Throws Reader\Exception

Throws SecHandler\Exception

Throws Type\Exception

Throws \Exception

extract()

public static 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 SecHandler\Exception

Throws Type\Exception

Throws \setasign\SetaPDF2\Exception

Throws \setasign\SetaPDF2\NotImplementedException