feat(前端界面): OFDGo WebUI可选是否渲染注解
build.yaml / build (push) Successful in 35s

This commit is contained in:
2026-07-07 13:10:55 +08:00
parent 98244f2bb7
commit f1d1f5ed2d
5 changed files with 35 additions and 25 deletions
+3 -1
View File
@@ -29,7 +29,8 @@ import (
// OpenOptions 打开OFD文档选项
type OpenOptions struct {
Fonts []FontFile
Fonts []FontFile
RenderAnnotations bool
}
// FontFile 字体文件
@@ -144,6 +145,7 @@ func Open(data []byte, opts OpenOptions) (*Session, error) {
}
rendererOptions = append(rendererOptions, ofdgo.WithFontFS(fontFS))
}
rendererOptions = append(rendererOptions, ofdgo.WithAnnotations(opts.RenderAnnotations))
return &Session{Reader: reader, Renderer: ofdgo.NewRenderer(reader, rendererOptions...), doc: doc}, nil
}