• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SVG with HTML

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there anyway to directly embed Scalable Vector Graphics into HTML? I am beginning to believe you can't, as all that I have read talks about using it with FOs and PDFs. Is SVG not intended to be used with HTML?
As an alternative, I looked for a utility which might translate a SVG file into a jpg or gif format. I tried using the the svg2jpg utility provided in the Csiro SVGToolkit, but the output was blurred.
Any help would be appreciated.
Russ
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have never heard of directly coding SVG in an HTML page but I know that you can create SVG with XML. A JSP page could read the xml and generate the image when loaded... or you could probably translate SVG to GIF or JPG. You should look into Batik from the Apache Group (http://xml.apache.org/batik/index.html).
Good luck.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is how I am using SVG for the web site that I am building for a company. It might work for you. First, get a graphics designer to design some graphics that you need for a web page or a web site you are working on. If you have some drawing abilities, you can do that yourself too. Then, convert it to SVG (many graphics editors can do that now). You can go to the site http://www.w3.org/graphics/SVG to find out which tools can output SVG. Then, use XSLT or Java to modify the properties of the SVG generated. Then, use a graphics tool that accepts SVG and generates JPG or GIF. In this way, if only some properties of the graphics need to be changed from time to time, you can change them on-the-fly.

------------------
Khun Yee Fung
Author of XSLT: Working with XML and HTML
 
Normally trees don't drive trucks. Does this tiny ad have a license?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic