Skip to content

转换PDF时字体问题 #5

Description

@liaoxb03

在ofd文件中res文件夹下有字体文件。这些字体文件不能够直接创建成PdfFont使用。创建时报错。请问有没有什么解决方法?
PdfFontFactory.createFont("src/main/resources/fonts/font_1.otf",PdfEncodings.IDENTITY_H, false);
报错信息:
com.itextpdf.io.IOException: Table name does not exist in src/main/resources/fonts/font_1.otf
at com.itextpdf.io.font.OpenTypeParser.readNameTable(OpenTypeParser.java:646)
at com.itextpdf.io.font.OpenTypeParser.loadTables(OpenTypeParser.java:449)
at com.itextpdf.io.font.TrueTypeFont.(TrueTypeFont.java:93)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions