iText 7 java.lang.NoSuchMethodError [英] iText 7 java.lang.NoSuchMethodError

本文介绍了iText 7 java.lang.NoSuchMethodError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!


我刚刚开始开发一个将HTML页面转换为PDF的新功能。我使用iText 7.按照指示此处

I just started developing a new function to convert HTML page to PDF. I use iText 7. Followed the instruction here!.

现在我收到错误线程main中的异常java.lang.NoSuchMethodError:com.itextpdf.layout.font.FontSet.getFonts ()Ljava / util / Set;


I have created pom.xml following the instruction here! but still received the same error.


I use eclipse. I put the pom.xml in the WebContent folder and received the error. Same result when moved the pom.xml into the WEB-INF folder.


Is the directory for the pom.xml wrong?


I've gone through the question here! and also here! but still doesn't work



pdfHTML 1.0.0 与iText Core <$不兼容 7.0.3 ,它仅与iText Core 7.0.2 兼容。有关详细信息,请参阅GitHub上的兼容性矩阵: /itext/itext7/releases/tag/7.0.3

pdfHTML 1.0.0 is not compatible with iText Core 7.0.3, it is only compatible with iText Core 7.0.2. Please refer to the compatibility matrix on GitHub for details:

iText Core 7.0.4 和计划于本月晚些时候一起发布的pdfHTML 1.0.1 也将兼容。

iText Core 7.0.4 and pdfHTML 1.0.1, scheduled to be released together later this month, will also be compatible.

如果你愿意的话想要使用快照构建,您可以将其添加到 pom.xml 并使用iText Core 7.0.4-SNAPSHOT 和pdfHTML 1.0.1-SNAPSHOT

Meanwile if you want to use snapshot builds, you can add this to your pom.xml and use iText Core 7.0.4-SNAPSHOT and pdfHTML 1.0.1-SNAPSHOT:

    <name>iText Repository - snapshots</name>


Use at your own risk, because snapshot builds are unsupported and are only for experienced developers who are willing to contribute to iText by following the latest development and submitting pull requests.


或者等到月末,你可以使用iText Core 7.0.4 和pdfHTML 1.0.1

Or just wait until the end of the month, when you can use iText Core 7.0.4 and pdfHTML 1.0.1.

这篇关于iText 7 java.lang.NoSuchMethodError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

登录 关闭
发送“验证码”获取 | 15天全站免登陆