Page 1 of 1

SVG "header" - Style information

Posted: Thu Apr 19, 2007 1:02 pm
by 9333771
hi,

I got a question about the SVG export format.

I'm a newbie in SVG, but I will like the file to be readable by a commun software. (for my users that are not graphics/images experts)

I thought about FireFox since it's free and got support for svg. But when I try to open it, looks like some style information are missing and it display me the xml tree.

After some research, I suppose this refer to the DOCTYPE, svg xmlns= and other format information.

Is it normal? Did I miss something about SVG? about the way to export?

Can you add the doctype information in the export lib?

Context:
winXP SP2,
FireFox 2.0
TeeChart win 7.05
Delphi Architect 9.0

PS:
InkScape read them without problem. (but i suppose that it knows what is reading, not like firefox)


thanks in advance,

Posted: Mon Apr 23, 2007 11:25 am
by Pep
Hi Mariano,

yes, you're correct, seems like Charts exported to svg file are not supported in Firefox, I've added this issue on our wish list to be considered for further releases.
In meantime the only way I can think of to use them would be by updating the files to a correct format manually.

Posted: Tue Apr 24, 2007 7:28 am
by 9333771
hi,

thanks for your answer.

I understood that more than one format (version) of SVG exist. And they use some DOCTYPE atttribut (like html) to specifie the format.

Will you be kind and tell me which format the teechart lib use (1.1 full ?)? What is the type declaration I should add??

off course, I can try to add anyone i found on the net, but i will like to add the good one.

thanks in advance for your time,

Posted: Fri Apr 27, 2007 6:23 am
by Pep
Hi Mariano,

adding the following lines into the <svg> tag should be sufficient :

xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"

xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"

Code: Select all

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg 
xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   
xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   
width="473px" height="433px" style="text-antialiasing:true">
<rect  x="0" y="0"  width="472" height="432" fill="rgb(240,240,240)"/>
<polyline fill="none"  stroke="white"
points="0,432 0,0 472,0 "/>
<polyline fill="none"  stroke="rgb(160,160,160)"
points="472,0 472,432 -1,432 "/>
....
...

Posted: Fri Apr 27, 2007 7:39 am
by 9333771
thanks!

I will try this.

see you,

Posted: Thu May 03, 2007 8:01 am
by 9333771
hi,

it's works great ! thanks.

I changed the code of TSVGCanvas to include it in the export file. (same system as DocType)

see you,