refactor(色彩管理): 统一色彩与四色保真
build.yaml / build (push) Successful in 10m5s

This commit is contained in:
xiaoqidun committed 2026-10-16 00:05:46 +08:00
1 parent 5e0bca66e3
commit b5a8c9af9c
24 files changed
+935 -223

No files matched your search

+11
View File
@@ -81,6 +81,7 @@ type pdfImporter struct {
clipTexts map[*pdfgo.TextClip][]TextObject
clipPaths *renderCache[[32]byte, pdfClipPath]
cmykSpace string
rgbSpace string
iccSpaces map[pdfICCKey]string
objects *pdfObjectBuffer
formResources *pdfFormCache
@@ -173,7 +174,17 @@ func ImportPDF(ctx context.Context, source io.ReaderAt, size int64, options PDFI
}
defer reader.Close()
importer.reader = reader
outputIntents, err := reader.OutputIntents()
if err != nil {
return nil, PDFImportReport{}, fmt.Errorf("import PDF output intents: %w", err)
}
importer.report.Warnings = diagnostics
if len(outputIntents) != 0 {
if options.Strict {
return nil, PDFImportReport{}, &pdfgo.UnsupportedError{Feature: "PDF output intent conversion"}
}
importer.report.Warnings = append(importer.report.Warnings, pdfgo.Diagnostic{Message: "PDF output intents not transferred to OFD"})
}
importer.pageIndexes = make(map[pdfgo.Reference]int)
importer.resolveFile = options.ResolveFile
importer.resolveReference = options.ResolveReference