Skip to content

Commit

Permalink
Fix engine detection
Browse files Browse the repository at this point in the history
  • Loading branch information
8ctopus committed May 29, 2024
1 parent 914119c commit db9773c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
'cache' => $cache,
'debug' => true,
// valid options: CPDF, PDFLib, GD, wkhtmltopdf and auto
'pdfBackend' => 'CPDF',
'pdfBackend' => 'PDFLib',
]);

file_put_contents('invoice.pdf', $pdf);
Expand Down
2 changes: 1 addition & 1 deletion src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function renderHtml() : string
*/
public function renderPdf(array $options = []) : string
{
$engine = $options['engine'] ?? '';
$engine = $options['pdfBackend'] ?? '';

if ($engine === 'wkhtmltopdf') {
return $this->renderWK($options);
Expand Down

0 comments on commit db9773c

Please sign in to comment.