Skip to content

Commit

Permalink
[Common] Improve pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
that-guy-iain committed Oct 24, 2023
1 parent 565a49e commit 3d1d7e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Parthenon/DependencyInjection/Modules/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,12 @@ private function configurePdf(array $config, ContainerBuilder $container, XmlFil
throw new MissingDependencyException('To use mpdf you need to have the mpdf/mpdf package installed. Do composer require mpdf/mpdf.');
}

$container->setParameter('parthenon.common.pdf.mpdf.tmp_dir', $config['common']['pdf']['mpdf']['tmp_dir']);
if (!isset($config['common']['pdf']['mpdf'])) {
$dir = '/tmp/';
} else {
$dir = $config['common']['pdf']['mpdf']['tmp_dir'] ?? '/tmp';
}
$container->setParameter('parthenon.common.pdf.mpdf.tmp_dir', $dir);
$loader->load('services/common/pdf/mpdf.xml');
} elseif (isset($config['common']['pdf']['generator']) && 'wkhtmltopdf' === $config['common']['pdf']['generator']) {
if (!class_exists(\Knp\Snappy\Pdf::class)) {
Expand Down

0 comments on commit 3d1d7e6

Please sign in to comment.