Skip to content

PDF fails after updating past 3.0.15 #145

@pixelmachine

Description

@pixelmachine

Describe the bug

I recently updated from 3.0.15 to 3.0.18 and PDF generation stopped working with an error:
"Undefined array key ''" on line 4752 in dompdf\dompdf\lib\Cpdf.php
The stack trace points to this line:
$font = $this->fonts[$this->currentFont];

I found an issue on dompdf but it doesn't really help as those options are not exposed in Gift Voucher.

  • PDF generation from Commerce (like an order receipt) still works fine.
  • Downgrading to 3.0.15 restored the functionality
  • This is on a linux cloud host but not Craft Cloud

I can see some changes were made around 3.0.16 for Craft Cloud PDFs so I assume they are the culprit.

Steps to reproduce

  1. Install 3.0.18
  2. Download a PDF
  3. See an error

Craft CMS version

4.16.11

Plugin version

3.0.18

Multi-site?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions