修改
This commit is contained in:
parent
9aae9842e9
commit
7c211a1c84
@ -143,12 +143,14 @@ func InsertSignatureV1(templatePath, outputPath, signImgPath, companyImgPath, co
|
|||||||
|
|
||||||
tffErr := pdf.AddTTFFont("simfang", "./data/simfang.ttf")
|
tffErr := pdf.AddTTFFont("simfang", "./data/simfang.ttf")
|
||||||
if tffErr != nil {
|
if tffErr != nil {
|
||||||
|
fmt.Printf("加载中文字体失败: %v\n", tffErr)
|
||||||
log.Fatalf("加载中文字体失败: %v", tffErr)
|
log.Fatalf("加载中文字体失败: %v", tffErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置字体和字号
|
// 设置字体和字号
|
||||||
err = pdf.SetFont("simfang", "", 14)
|
err = pdf.SetFont("simfang", "", 14)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Printf("设置字体失败: %v\n", err)
|
||||||
log.Fatalf("设置字体失败: %v", err)
|
log.Fatalf("设置字体失败: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +206,7 @@ func InsertSignatureV1(templatePath, outputPath, signImgPath, companyImgPath, co
|
|||||||
|
|
||||||
signImgResp, imageErr := http.Get(signImgPath)
|
signImgResp, imageErr := http.Get(signImgPath)
|
||||||
if imageErr != nil {
|
if imageErr != nil {
|
||||||
|
fmt.Printf("下载签名图片失败: %v\n", imageErr)
|
||||||
return errors.New("error downloading signature image")
|
return errors.New("error downloading signature image")
|
||||||
}
|
}
|
||||||
defer signImgResp.Body.Close()
|
defer signImgResp.Body.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user