[MPDF错误消息:必须在表中位于前面

问题描述 投票:-1回答:1
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
1个回答
0
投票

在较新的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

热门问题
推荐问题
最新问题