Nested <svg> tags ? - SVG File generated by NodeJS program

Hello everyone,

I have a question about the support of SVG file containing multiple nested <svg> tags.

I have a NodeJS program that assemble svgs from local files and placing them in correct order, then generate the merged file. But this process use nested <svg> tags for creating the layout.

My file read correctly in web browser and “look good” in Inkscape. The layout is the same as the web browser, but when I select the SVG, it show smaller dimension for the element than the current drawing. When I open the file in LightBurn, all of the elements goes to the origin top left of the file.

So, do this problem is linked to the usage of multiples nested <svg> elements in one file? Or it is something else?

Thanks for the help, I’m joining the file in question.

merged|0x73

Nested files were definitely not supported as late as Nov 2020. I don’t recall seeing anything since then to revise that so that may indeed be the reason you’re seeing this.

Hello !

Okay, thanks for the head up.

So, I have another question : Is it possible to create the same layout, only using element supported by LightBurn ? For the positionning I’m using the height, width, x and y parameter of the nested <svg>, and getting these for placing the next nested <svg>, etc. I know that <g> can only get x and y thanks to the parameter transform="translate()" is there a way to give them width and height ?

Thanks, have a nice day !

Perhaps work backwards. Create something in LightBurn that gets you what you need, then export the SVG to see how it’s done.

Hi, I tryed this, the svg file i’m using in the nested layout are all using <g> with a transform="matrix()" that is generated by inkscape. I can’t use this value since is linked of each design and I have dozen differents design.

So does anyone know an utility program or a trick that can make a svg file compatible with LightBurn ? Something like an svg editor that save the layout but with a different xml structure ? Or is the nested svg support is planned in LightBurn ?

Thanks, have a nice week.

I found this related post: Alternative to nested svgs? (to render properly outside the browser) - #5 by system - Learn - Elm
Maybe it can help?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.