I made the PR https://github.com/Dinamiko/dk-pdf/pull/94 and I kept my old solution updating the mpdf 7.0 https://github.com/wwwxkz/dk-pdf as I created another repo for this PR in https://github.com/wwwxkz/dk-pdf-fork. As said in the PR, although updating mpdf to 8.10 in composer.json works, it requires different PHP versions from dk-pdf, using 7.4 > worked fine for me, but I did not test for all of them.
I just uploaded my fork https://github.com/wwwxkz/dk-pdf I did some well formated finds and replaces (regex) and updated it to work in php 7 and 8, at least it is working locally, and I recomend you testing there before updating in your live