SVG that doesn't display in Inkscape.
Hi all, I just downloaded from the Creative Commons website their logos in SVG format and I cannot get them to load properly in Inkscape 0.38. I view them just fine in GQView, so I know that they are there, but I get a blank screen in Inkscape.
http://creativecommons.org/presskit/
Any ideas what's going on?
Thanks, Lee McLain
On Wed, 30 Jun 2004, Lee McLain wrote:
Hi all, I just downloaded from the Creative Commons website their logos in SVG format and I cannot get them to load properly in Inkscape 0.38. I view them just fine in GQView, so I know that they are there, but I get a blank screen in Inkscape.
http://creativecommons.org/presskit/
Any ideas what's going on?
There are a number of reasons why SVG files from other apps won't load in Inkscape, but here are some examples of reasons I've run into in the past:
* Uses CSS stylesheets. Inkscape's CSS support is limited at this stage. You can look in the .svg and see if elements are using style classes. Usually this reveals itself by everything in the image being black. There isn't a good workaround I know for this. Perhaps load them in a different app and convert? There's already a feature request for this.
* Has a content type header in the document. I've found this with some perl code that assumed it was being used to generate svg content for the web. Look at the first line of the file and see if it is something like "Content-type: ..." If so, you can usually just delete that line and the following blank line, and try again. This usually reveals itself by an error being printed to the console about bad XML, yada yada, then it loads a blank document.
* Uses SVG features unimplemented in Inkscape. This is not common, but sometimes the drawing uses SVG features that aren't present in Inkscape. I put a bunch of warnings to this effect in the codebase, so if you run inkscape from the console, these warnings should print out if this is the problem. Obviously, not much to do about this but put in a feature request if one isn't already in there for it.
HTH, Bryce
Quoth Lee McLain on or about 2004-06-30:
http://creativecommons.org/presskit/
Any ideas what's going on?
*investigates*
Removing the <switch> </switch> tags from around the body seems to work.
About 80% of the data is some binary formatted junk in an <i:pgf> tag. I guess it's a thumbnail or something.
Maybe as a kluge inkscape should ignore <switch> tags to make such exported images work?
-trent
On Wed, 2004-06-30 at 22:36, Trent Buck wrote:
Removing the <switch> </switch> tags from around the body seems to work.
About 80% of the data is some binary formatted junk in an <i:pgf> tag. I guess it's a thumbnail or something.
Maybe as a kluge inkscape should ignore <switch> tags to make such exported images work?
<switch> its intended use is to enclose a bunch of children, only one of which is supposed to be rendered (based on conditions specified in their requiredFeatures, requiredExtensions, and systemLanguage attributes); I'm not sure whether displaying everything would be an improvement over displaying nothing for typical documents that use it.
It shouldn't be hard to support properly, though. We're a little too close to the pre-release freeze to squeak it into this release, but I'll put in an RFE and stick it on the roadmap for 0.40.
-mental
Quoth MenTaLguY on or about 2004-07-02:
<switch> its intended use is to enclose a bunch of children, only one of which is supposed to be rendered (based on conditions specified in their requiredFeatures, requiredExtensions, and systemLanguage attributes); I'm not sure whether displaying everything would be an improvement over displaying nothing for typical documents that use it.
fwiw, I think it worked OK in this instance because inkscape could only understand one of the cases.
-t
participants (4)
-
Bryce Harrington
-
Lee McLain
-
MenTaLguY
-
Trent Buck