SVG spec



  • I've got a task that'll be coming up involving generating and printing an SVG file. I've got some time and I was wondering if anyone had any good links to the specs or tutorials on generating manually?

    I know SVG is essentially an extension of XML (otherwise I'm back to square one), and the original specs were to put a flash generated vector image into a pdf (I figured have flash generate and send an SVG to a PHP script which will generate the PDF). Or better yet if anyone knows of an example of exporting vector images from Flash ...7,8? (Flash MX 2004... I'm obviously not the flash developer) that would be great.

    Or if I'm completely off my rocker thinking throwing an SVG into a PDF is going to actually work, anyone have any other possible solutions?
     



  • ermm, i dunno about flash generated vecor images into pdf's, and i doubt there SVG, since pdf's are based on ps which while mostly vector based is quite a diffrent format.

    svg is easy though, like you say it's basically just a xml.

    easiest/dirtiest way to make them in php is just to print the correct tags. Otherwise just use some xml builder lib, or there might be a svg specific lib i dunno.

    Anyway, i sugest you download inkscape (http://www.inkscape.org/), it's a open source vector drawing program that works with svg, it also has a option to edit the svg directly trough a xml editor.
    This might give you a feel for how svg works. (although i believe inkscape extended a bit on the bare spec)

    And as for the spec itself, it's of course on the w3c.org site
    http://www.w3.org/Graphics/SVG/ 

    Be warned with using SVG though, although w3c has a published spec, most libs are pretty much in disagreement on how to implemented it, even worse then HTML.

    I can't seem to find it right now, but there was a blog post by someone shwoing the output of various svg libs of a single svg file. (although a pretty complex one) and the ouput of each libraries was quite a bit diffrent. (scale, gradients, etc.. not the basic shapes though)

     



  • The goal is to create the .SVG image up to Adobe's spec and embed the .SVG (much like a .JPEG or something) in the PDF (if that's possible).

    My rationale is that Adobe Acrobat Reader installs the Adobe SVG viewer automatically so I'm guaranteed support. The svg of course will only be used by the PDF for that functionality...
     



  • umm? why not just make the drawing in the pdf from the beginning?



  • I was going to look into that, I just figured the SVG format would be much more familiar to the flash developer (plus the added benefit of extensibility in the future should someone think of other uses for the SVG file). Time and our developer's skill are the most pressing issues.



  • > I just figured the SVG format would be much more familiar to the flash developer

    Beware.
    SVG has nothing, at all, to do with Flash. They're both vector, but that's it. I know Flash. I don't have a clue about SVG.
     


Log in to reply