Thank you for maintaining Mpdf extension! I use latest stable mediawiki docker image, which has php8.1 installed. Hovewer, in your Mpdf extension you use now incompatible version of mpdf github.com/wikimedia/mediawiki-extensions-Mpdf/blob/96d573c96eaf88d33c50ee38c1fa4fd421eece10/composer.json#L3 which crashes when you try to export wiki page to pdf with many kind of errors.
The correct version of Mpdf for php8.1 would be v8.0.13 as written in github.com/mpdf/mpdf
Could you please update mediwiki Mpdf version? Thank you!