I have a SVG file with a number of layers in it. I can open in Inkskape, save as new SVG but I still get the same error in lightburn: “an error occured while reading: invalid name for processing instruction - on line 2, column 6”.
I can copy and paste a layer into a fresh inskape project and export and I believe I managed to copy out of inkscape and paste into Lightbun.
SVG is generated by an online CAD program and I really hope I can find out how to make the file compatible as any other way of getting shapes in will be un workable for complex designs.
Make sure you are using Import to load the geometry into LightBurn, rather than Open. Although 'Open` should switch to importing an SVG file, apparently that process can fall off the rails.
Start by clicking the Import icon in the toolbar or selecting File → Import:
If that doesn’t improve the results, upload one of the offending SVGs so folks around here can take a look at it.
it’s an online pattern creation platform ( for clothes making). I’ve just noticed that when trying to open in a browser, I’m getting the same error.
If there’s no simple answer to get this opening in Lightburn, I’ll close this thread as I’m not expecting support on a file that’s clearly not to spec for a variety of programs, strange what Inkscape opens it ok !
I’ll go back to the platform and ask them what’s going on…
Screenshot attached. I’ve just noticed that Notepad++ is highlighting something on line 2. I’m used to editing XMLs ( ones I know a lot about), SVGs I know nothing.
That’s great, thanks for that. It definitely looks like an svg file. I forgot that you said you could open it in Inkscape. Can you try appending a .txt extension and attempting to attach it again?
Renaming to .txt wasn’t removing the svg attribute ( I guess this forum uploader doesn’t like this SVG either so blocking it) I’ve exported out of Notepad++ as a text file again and it now looks good to upload!
SVG files are one of the few formats that the forum does allow you to upload. Usually any svg you upload is shown rendered inline like this:
However if it is malformed or corrupted it might fail to parse it properly resulting in… well, I don’t know. I must admit that I thought that if you appended a .txt extension it would attach without parsing and rendering but I’ve just tested it and it still renders it as it did above!
You could try checking it with an svg validator or you could try running it through a sanitizer such as this one: https://svg.enshrined.co.uk/
EDIT:
You could also zip it up and then add the .txt extension to allow you to upload.
Did you remove only the highlighted part? If you accidentally removed the <svg part, it might fail.
Actually, I would even suggest to remove everything up to the <svg part (ie. keep this part).