I've make use of mPDF over the years. It's been a great tool for the website.
As we are heading toward PHP 8 I need to update a few things to maintain some continuity. Gone are the easy old ways for mPDF and I now have mPDF which should installed with composer.
I've successfully installed it on evo 1.4 and got it loaded and working. Fantastic. On v1.4 its more standalone.
So, I've come to check out installing it on v3 as a test to see whether I can do it and whether its done correctly.
So I've added what I needed to core/custom/composer.json. Updated the files. I have it working using the following snippet!
<?php
require_once MODX_BASE_PATH.'core/custom/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf();
$mpdf->writeHTML("<h1>This is a test</h1>");
$mpdf->output();
I tried the method fromhttps://github.com/evolution-cms/evolution/releases/tag/2.0.0-alpha but not quite sure what is actually needed.
I gotta say it's save a lot of effort having laravel available.