smalot / pdfparser

PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.
GNU Lesser General Public License v3.0
2.3k stars 534 forks source link

Font.php: hot fix for calculateTextWidth in case Widths key is not set #645

Closed k00ni closed 9 months ago

k00ni commented 9 months ago

Type of pull request

About

Hot fix for Font.php to avoid PHP warning in case the Widths-key is not set in $details.

Checklist for code / configuration changes

In case you changed the code/configuration, please read each of the following checkboxes as they contain valuable information:

Acknowledgement

Bug reported in #619 by @gidzr.

k00ni commented 9 months ago

I refined the wording of my comment. Changes like these might be needed in other places too, but for now that should be sufficient.