/ 详情

默认字体未生效,报错 `org.dromara.pdf.pdfbox.support.fonts.FileSystemFontProvider -- Could not load font file: C:\WINDOWS\FONTS\mstmc.ttf`

待办的
创建于  
2025-01-09 18:09

OS: Windows 11
JDK:openjdk version "21.0.4.0.4" 2024-07-16

8:04:31.190 [main] WARN org.dromara.pdf.pdfbox.support.fonts.FileSystemFontProvider -- Could not load font file: C:\WINDOWS\FONTS\mstmc.ttf
java.io.EOFException: EOF at 4096, b1: -1, b2: -1, b3: -1, b4: -1
	at org.apache.fontbox.ttf.TTFDataStream.readUnsignedInt(TTFDataStream.java:139)
	at org.apache.fontbox.ttf.TTFParser.readTableDirectory(TTFParser.java:390)
	at org.apache.fontbox.ttf.TTFParser.createFontWithTables(TTFParser.java:140)
	at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:164)
	at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:66)
	at org.dromara.pdf.pdfbox.support.fonts.FileSystemFontProvider.addTrueTypeFont(FileSystemFontProvider.java:557)
	at org.dromara.pdf.pdfbox.support.fonts.FileSystemFontProvider.addFont(FileSystemFontProvider.java:302)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at org.dromara.pdf.pdfbox.support.fonts.FileSystemFontProvider.scanFonts(FileSystemFontProvider.java:350)
	at org.dromara.pdf.pdfbox.support.fonts.FileSystemFontProvider.<init>(FileSystemFontProvider.java:286)
	at org.dromara.pdf.pdfbox.support.fonts.FontMapperImpl$DefaultFontProvider.<clinit>(FontMapperImpl.java:129)
	at org.dromara.pdf.pdfbox.support.fonts.FontMapperImpl.getProvider(FontMapperImpl.java:145)
	at org.dromara.pdf.pdfbox.handler.FontHandler.addFont(FontHandler.java:194)
	at org.dromara.pdf.pdfbox.handler.FontHandler.<init>(FontHandler.java:59)
	at org.dromara.pdf.pdfbox.handler.FontHandler.<clinit>(FontHandler.java:53)
	at org.dromara.pdf.pdfbox.handler.PdfHandler.getFontHandler(PdfHandler.java:39)
	at org.dromara.pdf.pdfbox.core.base.Context.addFontCache(Context.java:250)
	at org.dromara.pdf.pdfbox.core.base.Document.initOtherParams(Document.java:869)
	at org.dromara.pdf.pdfbox.core.base.Document.initBase(Document.java:743)
	at org.dromara.pdf.pdfbox.core.base.Document.init(Document.java:764)
	at org.dromara.pdf.pdfbox.core.base.Document.init(Document.java:750)
	at org.dromara.pdf.pdfbox.core.base.Document.<init>(Document.java:103)
	at org.dromara.pdf.pdfbox.handler.DocumentHandler.create(DocumentHandler.java:59)
	at com.simperfect.commons.test.EasyPDFTest.main(EasyPDFTest.java:16)

评论 (0)

Kirito丶城 创建了任务 11天前

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
3035059 wangjincheng4869 1646928540