Skip to content

Commit

Permalink
ZugferdDocumentPdfReader aceepts ZUGFeRD 1.0 filenames on unix systems
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarschall authored May 26, 2024
1 parent a42cdc6 commit d292f8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ZugferdDocumentPdfReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ZugferdDocumentPdfReader
/**
* List of filenames which are possible in PDF
*/
const ATTACHMENT_FILEAMES = ['factur-x.xml', 'zugferd-invoice.xml', 'xrechnung.xml'];
const ATTACHMENT_FILENAMES = ['ZUGFeRD-invoice.xml'/*1.0*/, 'zugferd-invoice.xml'/*2.0*/, 'factur-x.xml'/*2.1*/, 'xrechnung.xml'];

/**
* Load a PDF file (ZUGFeRD/Factur-X)
Expand All @@ -54,7 +54,7 @@ public static function readAndGuessFromFile(string $pdfFilename): ?ZugferdDocume
try {
foreach ($filespecs as $filespec) {
$filespecDetails = $filespec->getDetails();
if (in_array($filespecDetails['F'], static::ATTACHMENT_FILEAMES)) {
if (in_array($filespecDetails['F'], static::ATTACHMENT_FILENAMES)) {
$attachmentFound = true;
break;
}
Expand Down

0 comments on commit d292f8a

Please sign in to comment.