mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
eb20f66ffb
commit
075797402d
41 files changed
+633
-125
No files matched your search
+3
-2
@@ -383,6 +383,7 @@ func (p *pdfImporter) compileGroup(build func(*pdfImporter) error) (*RasterPage,
|
||||
return nil, box, err
|
||||
}
|
||||
editor := NewEditor()
|
||||
editor.SetResources(p.resources)
|
||||
editor.SetRenderBackends(p.editor.Backends())
|
||||
editor.SetFontDirs(p.editor.fontDirs...)
|
||||
editor.SetFontFS(p.editor.fontFS...)
|
||||
@@ -398,9 +399,9 @@ func (p *pdfImporter) compileGroup(build func(*pdfImporter) error) (*RasterPage,
|
||||
p.symbolFonts = make(map[*pdfgo.Font]*pdfImportedFont)
|
||||
}
|
||||
if p.clipPaths == nil {
|
||||
p.clipPaths = &renderCache[[32]byte, pdfClipPath]{limit: 8 << 20}
|
||||
p.clipPaths = resourceCache[[32]byte, pdfClipPath](p.resources, 8<<20)
|
||||
}
|
||||
local := pdfImporter{ctx: p.ctx, reader: p.reader, editor: editor, renderer: p.renderer, matrix: p.matrix, pageBox: p.pageBox, pageWidth: p.pageWidth, pageHeight: p.pageHeight, rasterDPI: p.rasterDPI, warning: p.warning, rasterWarned: true, fontIDs: map[*pdfgo.Font]string{}, fonts: p.fonts, symbolFonts: p.symbolFonts, clipPaths: p.clipPaths, textOrigins: p.textOrigins}
|
||||
local := pdfImporter{resources: p.resources, ctx: p.ctx, reader: p.reader, editor: editor, renderer: p.renderer, matrix: p.matrix, pageBox: p.pageBox, pageWidth: p.pageWidth, pageHeight: p.pageHeight, rasterDPI: p.rasterDPI, warning: p.warning, rasterWarned: true, fontIDs: map[*pdfgo.Font]string{}, fonts: p.fonts, symbolFonts: p.symbolFonts, clipPaths: p.clipPaths, textOrigins: p.textOrigins}
|
||||
if err := build(&local); err != nil {
|
||||
return nil, box, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user