Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » SVG field external link
SVG field external link [message #997252] Fri, 04 January 2013 17:40 Go to next message
Li Hao is currently offline Li HaoFriend
Messages: 28
Registered: August 2011
Junior Member
I am trying the SVG field, it is able to display svg file, but if the svg file contains external link to image file or other svg files, it does not show up. for example, I have this sample svg file:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
<svg xmlns=""
xml:space="preserve" viewBox="0 0 2155 1733"
preserveAspectRatio="xMidYMid meet">
<g id="bitmap" style="display:online">
<image x="0" y="0" width="2155" height="1733" xlink:href="C:/development/scout-workspace-juno/svg/test.jpg"/>
<g id="PajekSVG" style="display:online">
<g transform="translate(100 50)">
<g transform="scale(0.7)">
<image x="0" y="0" width="493" height="533" xlink:href="C:/development/scout-workspace-juno/svg/test.svg"/>

but it does not show up in the form. If I point the svg file to the file: C:/development/scout-workspace-juno/svg/test.svg

The content of test.svg:

<?xml version="1.0"?>
<svg width="640" height="480" xmlns="">
<!-- Created with SVG-edit - -->
<title>Layer 1</title>
<rect id="svg_1" height="26" width="43" y="160" x="177" stroke-width="5" stroke="#000000" fill="#ddbaba"/>

and this layer of svg content is able to show up properly in the form, but of course without the image background.

I have tested the sample svg in browser and it show up properly with both image and svg layer. How to get this working with scout?
Re: SVG field external link [message #997268 is a reply to message #997252] Fri, 04 January 2013 20:39 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 92
Registered: November 2010
Scout uses Apache Batik to render SVG graphics. As with other formats, rendering results are implementation dependent. So if a file looks good in Internet Explorer it must not necessarily look the same in Batik and vice versa.

In your case, try to use proper URLs to point to your images, e.g. file:///C:/development/scout-workspace-juno/svg/test.jpg. This did the trick for me.

If you are unsure if the problem is located in Scout or in Batik, you can download a simple SVG viewer from the Batik website. Download the binary distribution and run batik.jar. You can then load your SVG image and check if it renders correctly.

Re: SVG field external link [message #997292 is a reply to message #997268] Sat, 05 January 2013 00:38 Go to previous message
Li Hao is currently offline Li HaoFriend
Messages: 28
Registered: August 2011
Junior Member
I change it to file:/// and it works great. Thank you very much.
Previous Topic:Max Fraction Digits stuck at 2
Next Topic:Tomcat
Goto Forum:

Current Time: Sat May 26 14:11:42 GMT 2018

Powered by FUDForum. Page generated in 0.04202 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top