Creating an mPDF object failed with The HTML code size is larger than pcre.backtrack_limit 1000000. You should use WriteHTML() with smaller string lengths. Pass your HTML in smaller chunks.