天天看點

html轉pdf報錯 Invalid nested tag head found, expected closing tag link.

主要是expected closing tag link.這句話的意思,意思沒有閉合标簽

原因是:itext  html轉pdf對html格式要求比較嚴格,比如link标簽

html轉pdf報錯 Invalid nested tag head found, expected closing tag link.

必須是</link>這種結束标簽,其他标簽報錯同理

我用的是這3個依賴

html轉pdf報錯 Invalid nested tag head found, expected closing tag link.