This is an archived forum post. The information may be outdated. Contact us if you have any questions.

How to convert a svg graphic in html file?

seanzhao wrote on 2012-08-27:
I created a very simple html file to include a rect, the code is like:

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
</head>
<body >
<svg height="300" width="600">
<rect rx="0" ry="0" height="30" width="16.75" y="200" x="200" ></rect>
</svg>
</body></html>


And I put it in my website, link is http://webpivottable.com/wpt/chart.html

at browser, I can see that rect but when I copy this link to your online convert, no rect in pdf file.

What's wrong with my code? Any particular requirement to convert svg?

Thanks
support wrote on 2012-08-28:
There is no rectangle in the PDF file because the converter does not support static inline SVG elements embedded in HTML.

The converter supports:

1/ External SVG files, for example:
<img src="image.svg" />

2/ SVG elements created dynamically from JavaScript.