diff --git a/CHANGELOG.md b/CHANGELOG.md index afa3c15..d0cb9e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.3] - 2024-08-01 +- Fixed: possible exception in DompdfCreator + ## [0.4.2] - 2024-08-01 - Changed: widen dependency requirements diff --git a/PdfCreator/Concrete/DompdfCreator.php b/PdfCreator/Concrete/DompdfCreator.php index 2dd1a52..5c3382c 100644 --- a/PdfCreator/Concrete/DompdfCreator.php +++ b/PdfCreator/Concrete/DompdfCreator.php @@ -172,7 +172,7 @@ public function supports(): array { $support = []; - if (class_exists('setasign\Fpdi\Tcpdf\Fpdi')) { + if (class_exists(\TCPDF::class) && class_exists(Fpdi::class)) { $support[] = static::SUPPORT_MASTERTEMPLATE; } diff --git a/README.md b/README.md index 0c3e858..a5a9f4b 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ We recommend installing this library with composer: composer require heimrichhannot/pdf-creator You also need to install the pdf library, you want to use this bundle with: -- Dompdf: - - `"dompdf/dompdf": "^1.0"` +- Dompdf (version 1 to 3 are supported): + - `"dompdf/dompdf": "^3.0"` - if you want to use master templates in Dompdf, you also need FPDI and TCPDF: - `"tecnickcom/tcpdf": "^6.3"` - `"setasign/fpdi": "^2.3"` -- mPDF - - `"mpdf/mpdf": "^8.0"` (version ^7.0 also supported) +- mPDF (version 7 and 8 are supported): + - `"mpdf/mpdf": "^8.0"` - TCPDF - `"tecnickcom/tcpdf": "^6.3"` - if you want to use master templates in TCPDF, you also need FPDI: