feat(注解转换): 修正注解转换与图像导出
build.yaml / build (push) Successful in 52s

This commit is contained in:
xiaoqidun committed 2026-10-04 23:24:49 +08:00
1 parent d09c57f226
commit 5dcd7a4e8d
7 files changed
+61 -21

No files matched your search

+6 -2
View File
@@ -21,8 +21,12 @@ import "github.com/xiaoqidun/pdfgo"
// 返回: error 严格模式无法保留设备网屏
func (p *pdfImporter) halftone(style pdfgo.Style) error {
h := style.Halftone
message := "PDF continuous-tone appearance retained; device halftone not transferred to OFD"
if h == nil || h.Type == 0 {
return nil
if style.HalftoneOrigin == nil {
return nil
}
message = "PDF continuous-tone appearance retained; device halftone origin not transferred to OFD"
}
if p.warning == nil {
return &pdfgo.UnsupportedError{Feature: "device halftone conversion"}
@@ -32,7 +36,7 @@ func (p *pdfImporter) halftone(style pdfgo.Style) error {
}
if !p.halftoneWarnings[h] {
p.halftoneWarnings[h] = true
p.warning(pdfgo.Diagnostic{Message: "PDF continuous-tone appearance retained; device halftone not transferred to OFD"})
p.warning(pdfgo.Diagnostic{Message: message})
}
return nil
}