src/Service/MpdfService.php line 43
<?phpdeclare(strict_types=1);/** This file is part of the guesthouse administration package.** (c) Alexander Elchlepp <info@fewohbee.de>** For the full copyright and license information, please view the LICENSE* file that was distributed with this source code.*/namespace App\Service;use Symfony\Component\HttpFoundation\RequestStack;class MpdfService{private $requestStack;public function __construct(RequestStack $requestStack){$this->requestStack = $requestStack;}// put your code herepublic function getMpdf(){$locale = $this->requestStack->getCurrentRequest()->getLocale();$config = ['mode' => $locale,'format' => 'A4','orientation' => 'P','margin_left' => 25,'margin_right' => 20,'margin_top' => 20,'margin_bottom' => 20,'margin_header' => 9,'margin_footer' => 9,];return new \Mpdf\Mpdf($config);}}