You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfile=awaitfs.readFile(join(__dirname,'input.svg'))constimage=newImage();image.src=file;constcanvas=createCanvas(7800,10000);constctx=canvas.getContext('2d');ctx.drawImage(image,0,0);constbuffer=canvas.toBuffer('image/png');fs.writeFileSync('output.png',buffer);// etc.
Sorry for the slow reply. node-canvas definitely won't make network requests to load remote resources currently, and I don't know if librsvg provides a way to do it either (some info here). Is it possible for you to convert the remote URLs to data: URLs?
Issue or Feature
I'm having some issues when rendering an SVG file to PNG:
The style font doesn't support loading from a CSS font:
If I register the font file path, it works:
registerFont()
The image link doesn't support loading from a URL:
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: