background color not exported to formats other than png

Bug #166396 reported by Ikoframe
96
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Low
Unassigned

Bug Description

If I change the bacground color of a document and try
to save it as a ps file, the background color is
ignored and remains white ...

Revision history for this message
Bug Importer (bug-importer) wrote :

Background colour is currently exported only to png files,
to my knowledge -- it isn't even exported to SVG ! (At
least, not in standard SVG. It is recognized only by
inkscape and possibly sodiodi.)

As such, I'm inclined to remove this confusing option from
the user interface, and perhaps even stop parsing the
pagecolor directive: this and other bug reports show that it
is [at least currently] misleading to show this background
colour when we aren't exporting the background colour.

I believe that the icon preview window is to support viewing
on different background colours; this is the main
functionality we want. Exporting differently between png
and other formats seems wrong.

Other opinions?

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Instead we must migrate to supporting the SVG 1.2 background
property,

https://sourceforge.net/tracker/index.php?func=detail&aid=1105083&group_id=93438&atid=604306

but also support the old inkscape-only background color,
read-only, for compatibility.

Revision history for this message
Pablo Rodríguez (ousia) wrote :

Since librsvg (2.13.2) doens't display the background color,
this could be caused by a wrong definition of the background
color in the svg file. But this should be checked with batik
first (broken here due to java unsatisfied dependencies).

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

bug report referenced in comment #2:

bug #166213 “implement SVG 1.2 "background" property”
<https://bugs.launchpad.net/inkscape/+bug/166213>

tags: added: color ui
removed: linux
Revision history for this message
Federico Bruni (fedelogy) wrote :

Unfortunate bug... I'm drawing eye charts (to be printed on PDF) and I need also the negative (white on black).

I thought it was an issue with command-line (inkscape --export-background), but I can reproduce the same problem exporting through the GUI with File>Save as.

Do you know any tool to work around this limitation?

Revision history for this message
Federico Bruni (fedelogy) wrote :

Ok, found the workaround here:
http://stackoverflow.com/questions/11293026/default-background-color-of-svg-root-element

stick a <rect> element with width and height of 100% and fill="red" as the first child of the <svg> element

Revision history for this message
mray (mrayyyy) wrote :

Closing because this has been migrated via another issue already: https://gitlab.com/inkscape/inbox/issues/286 .

Closed by: https://gitlab.com/mray

Changed in inkscape:
status: Confirmed → Invalid
Revision history for this message
Hachmann (marenhachmann) wrote :

That's a different bug.

Changed in inkscape:
status: Invalid → Confirmed
Revision history for this message
Hachmann (marenhachmann) wrote :

This one is about adding an export option, not about how the SVG file looks in a different viewer.

mray (mrayyyy)
Changed in inkscape:
status: Confirmed → Invalid
status: Invalid → Confirmed
Revision history for this message
mray (mrayyyy) wrote :

The way I understand it the requested export option is exactly what is missing to make SVG files look the same in different viewers. It is the same in my eyes, you can re-open or keep commenting on here https://gitlab.com/inkscape/inbox/issues/286

or even better - if you think these are diffrerent, open a new one in gitlab that explains why they are different. ;)

Changed in inkscape:
status: Confirmed → Invalid
Revision history for this message
Patrick Storz (ede123) wrote :

@mray:
It's best not to mix different issues, even if solving one might provide a solution to the other
If there are two issues to solve, there should be two reports.
If they're related and a fix for one could solve the other, they should be linked.

Revision history for this message
Hachmann (marenhachmann) wrote :

I might transfer this, but not now.

Changed in inkscape:
status: Invalid → Confirmed
tbnorth (terry-n-brown)
tags: added: bug-migration
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.