on 08-30-2007 3:35 PM
I would like to put an SVG on an iprt pages, I have tryed to use:
<embed...
<object...
<iframe...
No luck.
Anyone have any examples.
I'd be willing to do it in a servlet or other method...
Thanks
Dennis
I had to dowload a plugn to view svg's in my browser.
<a href="http://sdx.archivesdefrance.culture.gouv.fr/gpl/navimages/en/svgViewer.html">http://sdx.archivesdefrance.culture.gouv.fr/gpl/navimages/en/svgViewer.html</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I actually have the plugin already installed. I can view the file as an html directly on my browser and it works fine for the Object and iframe methods, but when html or irpt pages come from the server, the source appears the same but the svgs are grey box placeholder in the embed and object but in the iframe I get a page cannot be found message...
Heres my sample Code for the HTML /IRPT Page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<h2>Using the <embed> Tag</h2>
<embed src="rect1.svg" width="300" height="100" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" />
<h2>Using the <object> Tag</h2>
<object data="rect.svg" width="300" height="100" type="image/svg+xml" codebase="http://www.adobe.com/svg/viewer/install/"></object>
<h2>Using the <iframe> Tag</h2>
<iframe src="rect.svg" width="300" height="100"></iframe>
</body>
</html>
Here is the code for the SVG Image
<?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 width="100" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/>
</svg>
Dennis,
This works fine for me:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<h1>Using the <iframe> Tag</h1>
<iframe src="<SVGFilePath>/<SVGFileName>.svg" width="300" height="100"></iframe>
</body>
</html>
My suggestion for you is to verify the path to the SVG object that it is in your web root and that you don't have some browser security issue. I tried the above with both an htm and irpt extension and there was no difference.
-Sam
OK, That's pretty much what I'm doing. I have taken your sample and used it.
I duplicated the iframe and placed an htm page in the first and an svg in the second like this:
<iframe src="Page.htm" width="700" height="200"></iframe><br />
<iframe src="rect.svg" width="700" height="200" ></iframe>
The htm page and svg files are both located in the same folder as the TEST IRPT. The Page.htm iframe works fine but the rect.svg iframe gives a "The page cannot be found" Error message.
The SVG does display correctly in the xMII Dynamic Graphics Editor.
When I view the Licence viewer I see the Connectors Include:
Base, IDBC, OLAP, OLEDB, UDC, VirtualServer, Wonderware-FactorySuite
Wonderware-InTouch-UDS, XML
Should there be a SVG Connector????
Dennis,
SVG is an Adobe technology not SAP, but xMII can leverage this technology since we have advanced XML manipulation capabilities. What exactly are you trying to do with this SVG? Perhaps you are going about this wrong.
Typically xMII uses an SVG to generate an SVA object that we can link properties into to change various SVG parameters, SVA is created using Dynamic Graphics editor. Then in Business Logic Services the Animation Renderer action is pointed to the SVA, values are linked to the action and then when the action is run an image is generated as the output of the action. This image can then be sent to an image saver action or fed directly as an image stream back to the web page. So I have to ask what are you trying to do and why, since your issues may not be worth solving since this is not a typical scenario. Hope this helps.
-Sam
FYI, SVG is a W3C standard, not an Adobe technology. Opera and Mozilla can render it natively...only IE needs the Adobe plug-in.
One advantage of client-side SVG is that you can have hyperlinks attached to individual elements in the SVG. Also, you can manipulate the SVG via scripting and also have web page script functions called from clicks or keyboard input on SVG elements...
Greetings All, my problem has been solved. I checked in with the Server Admin on this problem and he id'ed he problem in IIS.
Turns out that IIS denies access to files of unknown types.
Server Admin added the new MIME for IIS6 extension = ".svg" and type = "image/svg+xml" and it works fine now....
Thanks for all who suggested solutions
Did you try to add the SVG to the page just like you would a regular image file like a jpeg or bmp?
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.