feat(转换能力): 增强PDF转换,完善失效链接告警
build.yaml / build (push) Successful in 38s

This commit is contained in:
xiaoqidun committed 2026-09-24 21:17:27 +08:00
1 parent 0bc3f69df0
commit fd32384091
4 files changed
+12 -7

No files matched your search

+2 -2
View File
@@ -27,7 +27,7 @@ import (
)
// PDFImportOptions 指定PDF转换的运行时后端、进度通知与源文件检查策略
// Strict禁止恢复缺失的图形状态资源,默认恢复并在报告中记录警告
// Strict禁止恢复缺失的图形状态资源和无目标链接,默认恢复并在报告中记录警告
type PDFImportOptions struct {
Backends *RenderBackends
Progress func(int) error
@@ -113,7 +113,7 @@ func ImportPDF(ctx context.Context, source io.ReaderAt, size int64, options PDFI
if err := importer.flushPath(); err != nil {
return fmt.Errorf("import PDF page %d: %w", index+1, err)
}
if err := importer.annotations(ctx, page); err != nil {
if err := importer.annotations(ctx, page, options.Strict); err != nil {
return fmt.Errorf("import PDF page %d: %w", index+1, err)
}
if err := importer.commitObjects(); err != nil {