在iText中运行ParseHtml8示例所需的jar是什么?

时间:2015-11-07 07:07:51

标签: java html javafx-2 itext

我试图运行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());

1 个答案:

答案 0 :(得分:-4)

考虑使用maven构建项目并添加依赖项

<dependency>
    <groupId>com.lowagie</groupId>
    <artifactId>itext</artifactId>
    <version>YOUR_VERSION</version>
</dependency>