Skip to content

Class ZugferdDocumentPdfReaderExt

HorstOeko edited this page Dec 25, 2024 · 1 revision

Summary

Class representing the extended document reader for incoming PDF/A-Documents with
attached XML data in BASIC-, EN16931- and EXTENDED profile. The Extended PDF reader
reads also additinal attached documents from PDF

Methods

fromFile [static]

Summary

Load a PDF file

Signature

public static function fromFile(string $pdfFilename): \ZugferdDocumentPdfReaderExt
{
}

Parameters

Name Type Allows Null Description
pdfFilename string Contains a full-qualified filename which must exist and must be readable

Returns

Returns a value of type \ZugferdDocumentPdfReaderExt

fromContent [static]

Summary

Load a PDF content string

Signature

public static function fromContent(string $pdfContent): \ZugferdDocumentPdfReaderExt
{
}

Parameters

Name Type Allows Null Description
pdfContent string Contains the raw data of a PDF

Returns

Returns a value of type \ZugferdDocumentPdfReaderExt

readAndGuessFromFile [static]

Summary

Load a PDF file and return a ZugferDocumentReader-Instance

Signature

public static function readAndGuessFromFile(string $pdfFilename): \ZugferdDocumentReader
{
}

Parameters

Name Type Allows Null Description
pdfFilename string Contains a full-qualified filename which must exist and must be readable

Returns

Returns a value of type \ZugferdDocumentReader

readAndGuessFromContent [static]

Summary

Load a PDF content and return a ZugferDocumentReader-Instance

Signature

public static function readAndGuessFromContent(string $pdfContent): \ZugferdDocumentReader
{
}

Parameters

Name Type Allows Null Description
pdfContent string Contains the raw data of a PDF

Returns

Returns a value of type \ZugferdDocumentReader

getInvoiceDocumentContentFromFile [static]

Summary

Returns a invoice document XML content from a PDF file
similar to ZugferdDocumentPdfReader::getXmlFromContent

Signature

public static function getInvoiceDocumentContentFromFile(string $pdfFilename): string
{
}

Parameters

Name Type Allows Null Description
pdfFilename string Contains a full-qualified filename which must exist and must be readable

Returns

Returns a value of type string

getInvoiceDocumentContentFromContent [static]

Summary

Returns a invoice document XML content from a PDF content string

Signature

public static function getInvoiceDocumentContentFromContent(string $pdfContent): string
{
}

Parameters

Name Type Allows Null Description
pdfContent string Contains the raw data of a PDF

Returns

Returns a value of type string

getAdditionalDocumentContentsFromFile [static]

Summary

Returns all additional documents (except the invoice document) from a PDF file

Signature

public static function getAdditionalDocumentContentsFromFile(string $pdfFilename): array
{
}

Parameters

Name Type Allows Null Description
pdfFilename string Contains a full-qualified filename which must exist and must be readable

Returns

Returns a value of type array<int,array{type: int, content: string, filename: string, mimetype: string}>

getAdditionalDocumentContentsFromContent [static]

Summary

Returns all additional documents (except the invoice document) from a PDF content string

Signature

public static function getAdditionalDocumentContentsFromContent(string $pdfContent): array
{
}

Parameters

Name Type Allows Null Description
pdfContent string Contains the raw data of a PDF

Returns

Returns a value of type array<int,array{type: int, content: string, filename: string, mimetype: string}>

resolveInvoiceDocumentReader

Summary

Returns an instance of ZugferdDocumentReader by a valid invoice attachment

Signature

public function resolveInvoiceDocumentReader(): \ZugferdDocumentReader
{
}

Returns

Returns a value of type \ZugferdDocumentReader

resolveInvoiceDocumentContent

Summary

Returns the content as string if a valid invoice attachment was found, otherwise
an exception will be raised

Signature

public function resolveInvoiceDocumentContent(): string
{
}

Returns

Returns a value of type string

resolveAdditionalDocumentContents

Summary

Returns a list of all additional attached documents except the invoice document

Signature

public function resolveAdditionalDocumentContents(): array
{
}

Returns

Returns a value of type array<int,array{type: int, content: string, filename: string, mimetype: string}>

Clone this wiki locally