Skip to main content
added 11 characters in body
Source Link
Billy Kerr
  • 89.5k
  • 6
  • 83
  • 179

Inkscape has no background attribute as such, although it does have pagecolor which can be set in the document properties (it shows up as "background" in the UI, but appears as "pagecolor" in the XML). The problem however is that the pagecolor attribute is not supported in SVG and so it will be lost when you export as plain SVG.

Instead you could try editing the SVG in a text editor to add a white filled rectangle the same size as the canvas, and before (i.e. underneath) the artwork layer. Sorry, I don't know how to do that with the command line, but hopefully there's enough information here to help you work it out.

for example:

<rect width="100%" height="100%" fill="#ffffff"/>

Inkscape has no background attribute as such, although it does have pagecolor which can be set in the document properties (it shows up as "background" in the UI, but appears as "pagecolor" in the XML). The problem however is that the pagecolor attribute is not supported in SVG and so it will be lost when you export as plain SVG.

Instead you could try editing the SVG in a text editor to add a white filled rectangle the same size as the canvas, and before the artwork layer. Sorry, I don't know how to do that with the command line, but hopefully there's enough information here to help you work it out.

for example:

<rect width="100%" height="100%" fill="#ffffff"/>

Inkscape has no background attribute as such, although it does have pagecolor which can be set in the document properties (it shows up as "background" in the UI, but appears as "pagecolor" in the XML). The problem however is that the pagecolor attribute is not supported in SVG and so it will be lost when you export as plain SVG.

Instead you could try editing the SVG in a text editor to add a white filled rectangle the same size as the canvas, and before (i.e. underneath) the artwork layer. Sorry, I don't know how to do that with the command line, but hopefully there's enough information here to help you work it out.

for example:

<rect width="100%" height="100%" fill="#ffffff"/>
Source Link
Billy Kerr
  • 89.5k
  • 6
  • 83
  • 179

Inkscape has no background attribute as such, although it does have pagecolor which can be set in the document properties (it shows up as "background" in the UI, but appears as "pagecolor" in the XML). The problem however is that the pagecolor attribute is not supported in SVG and so it will be lost when you export as plain SVG.

Instead you could try editing the SVG in a text editor to add a white filled rectangle the same size as the canvas, and before the artwork layer. Sorry, I don't know how to do that with the command line, but hopefully there's enough information here to help you work it out.

for example:

<rect width="100%" height="100%" fill="#ffffff"/>