danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 359 forks source link

初次运行时报错此错误 #862

Open Historya opened 2 years ago

Historya commented 2 years ago

2022-08-12 23:03:15.187 WARN 59840 --- [nio-8087-exec-1] org.apache.fontbox.ttf.TTFParser : Skip table '®Aò%' which goes past the file size; offset: 1701229578, size: 1496687704, font size: 4096 2022-08-12 23:03:15.188 WARN 59840 --- [nio-8087-exec-1] org.apache.fontbox.ttf.TTFParser : Skip table 'A[k' which goes past the file size; offset: 2904719160, size: 2354760793, font size: 4096 2022-08-12 23:03:15.196 WARN 59840 --- [nio-8087-exec-1] o.a.p.p.font.FileSystemFontProvider : Could not load font file: C:\Windows\FONTS\mstmc.ttf

java.io.EOFException: null at org.apache.fontbox.ttf.TTFDataStream.readUnsignedInt(TTFDataStream.java:150) at org.apache.fontbox.ttf.TTFParser.readTableDirectory(TTFParser.java:327) at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:143) at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:91) at org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.addTrueTypeFont(FileSystemFontProvider.java:658) at org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.scanFonts(FileSystemFontProvider.java:380) at org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.(FileSystemFontProvider.java:359) at org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.(FontMapperImpl.java:140) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:159) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:423) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFontBoxFont(FontMapperImpl.java:386) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.getFontBoxFont(FontMapperImpl.java:360) at org.apache.pdfbox.pdmodel.font.PDType1Font.(PDType1Font.java:146) at org.apache.pdfbox.pdmodel.font.PDType1Font.(PDType1Font.java:79) at com.openhtmltopdf.pdfboxout.fontstore.AbstractFontStore$BuiltinFontStore.addCourier(AbstractFontStore.java:55) at com.openhtmltopdf.pdfboxout.fontstore.AbstractFontStore$BuiltinFontStore.createInitialFontMap(AbstractFontStore.java:43)