This commit is contained in:
@@ -114,7 +114,7 @@ func (g *PDFGeneratorRefactored) generatePDF(product *entities.Product, doc *ent
|
||||
|
||||
// 保存当前工作目录(用于后续恢复)
|
||||
originalWorkDir, _ := os.Getwd()
|
||||
|
||||
|
||||
// 关键修复:gofpdf在AddUTF8Font和Output时都会处理字体路径
|
||||
// 如果路径是绝对路径 /app/resources/pdf/fonts/simhei.ttf,gofpdf会去掉开头的/
|
||||
// 变成相对路径 app/resources/pdf/fonts/simhei.ttf
|
||||
|
||||
Reference in New Issue
Block a user