【问题标题】:Connot extract NotoSansCJKsc-Regular font error in adobe reader?无法在 adobe reader 中提取 NotoSansCJKjp-Regular 字体错误?
【发布时间】:2017-09-29 16:22:41
【问题描述】:

我可以在 IE、Chrome 中显示中文、日文和所有其他亚洲语言,但是当我打开 PDF 时 在居住阅读器中,它会引发以下错误...

我正在使用 GOOGLE NOTO 字体。

这是我的示例代码...

字体 asianFont = FontFactory.getFont("path\NotoSansCJKsc-Regular.otf", BaseFont.IDENTITY_H , BaseFont.EMBEDDED,8);

请帮忙。

【问题讨论】:

    标签: java pdf fonts itext google-webfonts


    【解决方案1】:

    我是 iText 的一名员工,最近看到这个问题(以不同的字体)作为一个更大问题的一个小节出现。

    如果您使用的是 iText 5: 升级到 5.5.12 的最新版本。

    如果您使用的是 iText 7: 修复将在我们的下一个版本 7.0.5 中。目前有可用的 SNAPSHOT 版本包含此修复。

    如果您使用 Maven,您可以更新您的 pom.xml 以使用 7.0.5 快照版本:

    <project>
       <!-- Required for the access to the iText SNAPSHOT dependency -->
       <repositories>
            <repository>
                <id>itext</id>
                <name>iText Repository - snapshots</name>
                <url>https://repo.itextsupport.com/snapshots</url>
            </repository>
        </repositories>
    ...    
        <!-- Dependency for the SNAPSHOT build -->
        <dependencies>
            <dependency>
                <groupId>com.itextpdf</groupId>
                <artifactId>itext7-core</artifactId>
                <version>7.0.5-SNAPSHOT</version>
                <type>pom</type>
            </dependency>
        </dependencies>
    </project>
    

    或者您可以直接从我们的工件服务器下载快照 jar:https://repo.itextsupport.com/webapp/#/artifacts/browse/simple/General/snapshot/com/itextpdf

    7.0.5目前计划下个月晚些时候(17年10月)正式发布

    我刚刚使用 NotoSansCJKsc-Regular 字体尝试了上述两个版本,并且能够生成没有错误的文档。

    【讨论】:

    • 嗨,Jon,他们还需要将我们的 Artifactory 服务器添加为存储库,因为快照不在 Maven Central 上。
    猜你喜欢
    • 2020-04-08
    • 2010-09-09
    • 2012-10-13
    • 1970-01-01
    • 2016-05-07
    • 1970-01-01
    • 1970-01-01
    • 2016-11-18
    • 2017-01-28
    相关资源
    最近更新 更多