refactor(重构提升): 优化转换渲染与资源压缩
build.yaml / build (push) Successful in 2m49s

This commit is contained in:
xiaoqidun committed 2026-10-06 17:53:24 +08:00
1 parent bcb9f98f8b
commit 3959664448
52 files changed
+1864 -407

No files matched your search

+9 -2
View File
@@ -36,7 +36,11 @@ func (p *pdfImporter) appearanceAnnotation(ctx context.Context, page *pdfgo.Page
if key == "A" && (annotation.Subtype == "Link" || annotation.Subtype == "Movie") {
continue
}
if annotation.Dictionary[key] != nil {
value, err := p.reader.Resolve(annotation.Dictionary[key])
if err != nil {
return err
}
if value != nil {
return &pdfgo.UnsupportedError{Feature: fmt.Sprintf("annotation field %q", key)}
}
}
@@ -113,7 +117,10 @@ func (p *pdfImporter) appearanceAnnotation(ctx context.Context, page *pdfgo.Page
}
converted.Parameters = &AnnotationParameters{Parameter: []AnnotationParameter{{Name: "PDF.Text.Open", Value: strconv.FormatBool(value == pdfgo.Boolean(true))}}}
}
popupObject := annotation.Dictionary["Popup"]
popupObject, err := p.reader.Resolve(annotation.Dictionary["Popup"])
if err != nil {
return err
}
if annotation.Subtype == "Popup" {
popupObject = annotation.Dictionary
}