html2pdf 安卓版,html - Html2pdf download pdf - Stack Overflow

此篇博客讲述了使用Html2Pdf库将HTML转换为PDF时遇到的‘div’标签关闭顺序错误问题,作者分享了解决步骤,并提供了关键代码片段。读者可以从中了解到如何检查HTML结构和修复此类错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I really don't know on how to solve this problem. I'm using html2pdf library to convery my html to pdf. Okay, so I have a download button wherein the user can download the html to pdf. But I got these errors: I've also checked the closing tags in html. Thanks guys.

Spipu\Html2Pdf\Exception\HtmlParsingException: Tags are closed in a wrong order for [div] in C:\xampp\htdocs\DTR\vendor\spipu\html2pdf\src\Parsing\Html.php:262 Stack trace: #0 C:\xampp\htdocs\DTR\vendor\spipu\html2pdf\src\Parsing\Html.php(94): Spipu\Html2Pdf\Parsing\Html->getTagAction(Object(Spipu\Html2Pdf\Parsing\Token), Array) #1 C:\xampp\htdocs\DTR\vendor\spipu\html2pdf\src\Html2Pdf.php(594): Spipu\Html2Pdf\Parsing\Html->parse(Array) #2 C:\xampp\htdocs\DTR\pages\download.php(18): Spipu\Html2Pdf\Html2Pdf->writeHTML('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n...') #3 {main}

CHRD - 001 - 0
(Civil Service Form No. 48)

Daily Time Record

-----o0o-----
Sample Name
(Name)

For the month of September 16 - September 30, 2018

Official hours for arrival       Regular days Monday - Friday

and departure 8 AM - 5 PM      Saturdays None

DayA.M.P.M.Undertime
ArrivalDepartureArrivalDepartureHoursMinutes
1600
1707:35 AM12:01 PM12:54 PM05:03 PM00
1807:58 AM12:07 PM12:53 PM05:05 PM00
1900
2000
2100
2200
2300
2408:05 AM12:04 PM12:54 PM05:03 PM00
2507:37 AM12:05 PM12:50 PM05:03 PM00
2607:50 AM12:05 PM12:53 PM05:02 PM00
2707:31 AM12:00 PM12:54 PM05:05 PM00
2807:26 AM12:06 PM12:53 PM05:05 PM00
2900
3000

for($i = 1; $i <= 14; $i++) {

?>

  

}

?>

Total00

I certify on my honor that the above is a true and correct report of the hours of work performed, record of which was made daily at the time of arrival and departure from office.

___________________________________________

VERIFIED as to the prescribed office hours:

___________________________________________

In Charge:

(SEE INSTRUCTION ON BACK)

CHRD - 001 - 0
(Civil Service Form No. 48)

Daily Time Record

-----o0o-----
Sample Name
(Name)

For the month of September 16 - September 30, 2018

Official hours for arrival       Regular days Monday - Friday

and departure 8 AM - 5 PM      Saturdays None

DayA.M.P.M.Undertime
ArrivalDepartureArrivalDepartureHoursMinutes
1600
1707:35 AM12:01 PM12:54 PM05:03 PM00
1807:58 AM12:07 PM12:53 PM05:05 PM00
1900
2000
2100
2200
2300
2408:05 AM12:04 PM12:54 PM05:03 PM00
2507:37 AM12:05 PM12:50 PM05:03 PM00
2607:50 AM12:05 PM12:53 PM05:02 PM00
2707:31 AM12:00 PM12:54 PM05:05 PM00
2807:26 AM12:06 PM12:53 PM05:05 PM00
2900
3000

for($i = 1; $i <= 14; $i++) {

?>

  

}

?>

Total00

I certify on my honor that the above is a true and correct report of the hours of work performed, record of which was made daily at the time of arrival and departure from office.

___________________________________________

VERIFIED as to the prescribed office hours:

___________________________________________

In Charge:

(SEE INSTRUCTION ON BACK)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值