天天看点

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.