我试图运行this example,但在下面的语句中出现错误。我已经添加了与itext最新版本相关的所有库。
XMLWorkerFontProvider fontProvider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
fontProvider.register("resources/fonts/NotoNaskhArabic-Regular.ttf");
CssAppliers cssAppliers = new CssAppliersImpl(fontProvider);
HtmlPipelineContext htmlContext = new HtmlPipelineContext(cssAppliers);
htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory());
答案 0 :(得分:-4)
考虑使用maven构建项目并添加依赖项
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>YOUR_VERSION</version>
</dependency>