Skip to content

Commit

Permalink
Fix ZugferdPdfWriter not outputting metadata if there are no files
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarschall authored Jul 9, 2024
1 parent 8ad5b36 commit 7401eca
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 7401eca

Please sign in to comment.