修改字体代码
This commit is contained in:
@@ -243,8 +243,7 @@ public class TGiftBookDetailsServiceImpl implements ITGiftBookDetailsService {
|
||||
Document document = new Document(pdfDoc, PageSize.A4, false);
|
||||
|
||||
// 设置字体
|
||||
File file = new File(ttfPath);
|
||||
PdfFont font = PdfFontFactory.createFont(file.getAbsolutePath(), PdfEncodings.IDENTITY_H);
|
||||
PdfFont font = PdfFontFactory.createFont(ttfPath, PdfEncodings.IDENTITY_H);
|
||||
document.setFont(font);
|
||||
pdfDoc.addNewPage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user