@@ -143537,6 +143537,8 @@ async function makePDF(svg, args) {
143537143537 }
143538143538 });
143539143539
143540+ let pr = Promise.resolve();
143541+
143540143542 if (nodejs) {
143541143543 const doc = internals.nodejs_document;
143542143544 doc.originalCreateElementNS = doc.createElementNS;
@@ -143558,6 +143560,10 @@ async function makePDF(svg, args) {
143558143560 };
143559143561 return res;
143560143562 };
143563+
143564+ pr = Promise.resolve().then(function () { return _rollup_plugin_ignore_empty_module_placeholder$1; }).then(handle => {
143565+ globalThis.Image = handle.Image;
143566+ });
143561143567 }
143562143568
143563143569 const orientation = (svg.width < svg.height) ? 'portrait' : 'landscape';
@@ -143594,10 +143600,9 @@ async function makePDF(svg, args) {
143594143600 doc.addFont(filename, fcfg.n, fcfg.s || 'normal');
143595143601 });
143596143602
143597- let pr = Promise.resolve();
143598143603 if (need_symbols && !custom_fonts[kSymbol] && settings.LoadSymbolTtf) {
143599143604 const handler = new FontHandler(122, 10);
143600- pr = handler.load().then(() => {
143605+ pr = pr.then(() => handler.load() ).then(() => {
143601143606 handler.addCustomFontToSvg(select(svg.node));
143602143607 doc.addFileToVFS(kSymbol + '.ttf', handler.base64);
143603143608 doc.addFont(kSymbol + '.ttf', kSymbol, 'normal');
@@ -143630,8 +143635,10 @@ async function makePDF(svg, args) {
143630143635 globalThis.document = undefined;
143631143636 globalThis.CSSStyleSheet = undefined;
143632143637 globalThis.CSSStyleRule = undefined;
143638+ globalThis.Image = undefined;
143633143639 internals.nodejs_document.createElementNS = internals.nodejs_document.originalCreateElementNS;
143634- if (args?.as_buffer) return Buffer.from(res);
143640+ if (args?.as_buffer)
143641+ return Buffer.from(res);
143635143642 }
143636143643
143637143644 return res;
0 commit comments