Can't print pdf : Notice: Undefined index: thead in /vendor/fooman/tcpdf/tcpdf.php

If you are getting a PHP Notice message when trying to generate any pdf invoice:

	Notice: Undefined index: thead in /vendor/fooman/tcpdf/tcpdf.php

it usually happens after adding custom text that includes some html tags with a small error. Please note that the pdf conversion process is not as forgiving as a browser and needs 100% correct html to function.

Here are some examples with incorrect html

<p>Paragraph with only an opening tag

<br>
there is no br tag, it's officially
<br/>

etc.

Stores > Configuration > Sales > PDF Print-outs

Still need help? Contact Us Contact Us