An uncaught Exception was encountered
Type: Mpdf\MpdfException
Message: must precede in a table
Filename: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Mpdf.php
Line Number: 13410
Backtrace:
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Mpdf.php
Line: 23545
Function: TableHeaderFooter
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Tag/Table.php
Line: 1121
Function: _tableWrite
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Tag.php
Line: 246
Function: close
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Mpdf.php
Line: 15272
Function: CloseTag
File: /home/press.altisinfonet.com/public_html/app/libraries/Tec_mpdf.php
Line: 68
Function: WriteHTML
File: /home/press.altisinfonet.com/public_html/app/libraries/Sma.php
Line: 302
Function: generate
File: /home/press.altisinfonet.com/public_html/app/controllers/admin/Sales.php
Line: 418
Function: generate_pdf
File: /home/press.altisinfonet.com/public_html/index.php
Line: 303
Function: require_once
在较新的mPDF版本中(或在纯文本呈现中,此异常的消息为<tfoot> must precede <tbody> in a table
。
根据HTML 4规范,表元素的顺序必须为<thead>
→<tfoot>
→<tbody>
(这与HTML 5规范直接矛盾,其中顺序为<thead>
→<tbody>
→<tfoot>
)。
mPDF在此问题上遵守HTML 4。
将<tbody>
放在表的末尾,不会引发异常。
另请参见:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot