Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Unable to render image from svg file

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #236056
    Aks
    Participant

    Hi. Currently I am facing issue with rendering images from svg file referenced in a parent svg.
    I have an svg file named “renderChild2.svg” that has an image tag to refer to a jpg image. When I run this svg file independently it renders the image on IE9.

    Now I have a parent svg file “Main.svg” that refers two svg’s files.
    One of which has inline rect and line tags named “renderChild1.svg” and the other being “renderChild2.svg”
    The “Main.svg” renders only from renderChild1.svg while renderChild2.svg image is not seen. Please share your views on it.

    Below is the code snippet:

    renderChild1.svg:
    <?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
    <svg xmlns=”http://www.w3.org/2000/svg&#8221; xmlns:xlink=”http://www.w3.org/1999/xlink&#8221; width=”400.000000″ height=”277.000″>
    <image x=”0.000″ y=”3″ width=”100%” height=”100%” xlink:href=”d:/skyspace.jpg” />
    </svg>

    renderChild2.svg:
    <?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
    <svg xmlns=”http://www.w3.org/2000/svg&#8221; xmlns:xlink=”http://www.w3.org/1999/xlink&#8221; width=”320.000000″ height=”328.000″ >
    <rect x=”45″ y=”-1213.600″ width=”30″ height=”20417.229″ style=”stroke:white; fill:white;”/>
    <line x1=”45″ y1=”-1213.600″ x2=”45″ y2=”19203.629″ style=”stroke:blue;stroke-width:1;”/>
    <line x1=”75″ y1=”-1213.600″ x2=”75″ y2=”19203.629″ style=”stroke:blue;stroke-width:1;”/>
    <line x1=”45″ y1=”-1213.600″ x2=”34″ y2=”-1213.600″ style=”stroke:blue;stroke-width:1;”/>
    <line x1=”75″ y1=”-1213.600″ x2=”86″ y2=”-1213.600″ style=”stroke:blue;stroke-width:1;”/>
    </svg>

    Main.svg:
    <?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”&gt;
    <svg version=”1.1″ xmlns=”http://www.w3.org/2000/svg&#8221; xmlns:xlink= “http://www.w3.org/1999/xlink”&gt;
    <image xlink:href=”C:/Users/e208640/Desktop/renderChild1.svg” x=”0″ y=”0″ width=’320.000′ height=’277’/>
    <object viewBox=”0 0 1024 768″ data=”C:/Users/e208640/Desktop/renderChild2.svg” type=”image/svg+xml”>
    </svg>

    #236057
    Paulie_D
    Member

    A Codepen.io demo is more use than a codedump.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.