Skip to content

Commit

Permalink
Merge pull request #100 from danielmarschall/patch-6
Browse files Browse the repository at this point in the history
Fix ZugferdPdfWriter not outputting metadata if there are no files
  • Loading branch information
horstoeko authored Jul 10, 2024
2 parents 8ad5b36 + 7401eca commit 272e9ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ZugferdPdfWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,13 @@ protected function _putcatalog(): void
} else {
$this->_put(sprintf('/AF %s 0 R', $this->filesIndex));
}
}

if (0 != $this->descriptionIndex) {
$this->_put(sprintf('/Metadata %s 0 R', $this->descriptionIndex));
}
if (0 != $this->descriptionIndex) {
$this->_put(sprintf('/Metadata %s 0 R', $this->descriptionIndex));
}

if (!empty($this->files)) {
$this->_put('/Names <<');
$this->_put('/EmbeddedFiles ');
$this->_put(sprintf('%s 0 R', $this->filesIndex));
Expand Down

0 comments on commit 272e9ba

Please sign in to comment.