General XMetaL Discussion

  • rewers08

    SVG in normal view

    Participants 0
    Replies 1
    Last Activity 13 years, 2 months ago


    in our project we are using XMetaL v5.5.
    We are using standard XML with our own XML Schemas (no DITA). What we would like to do is to embed svg-files in our documents so that we can see them in the XMetaL normal view.
    I've installed the Adobe SVG-Viewer which works fine in Internet Explorer. In the customization file (.ctm) I've set “treat as type: image” with a mapping to the appropriate src-attribute. The used svg graphic is in a separate file and linked thorugh the correct src-path to the document. If I exchange the svg-file with a random jpg-file everything works just fine. But not for the svg-grafik. XMetaL shows only the typical placeholder X-icon to show that it can't find or load the graphic file.

    Does anyone have an idea what I'm doing wrong?

    Thanks in advance and greetings,


    Derek Read

    Reply to: SVG in normal view

    SVG is not an image format that XMetaL Author (or XMAX) can render on its own (yet). In order to render it in XMetaL Author you need to configure the CTM file to use an ActiveX control to display the SVG. This is what the DITA customization does.

    Have a look at the section called “In Place Controls” in the Programmers Guide. It describes the settings you need to set in the CTM file and the events needed to be created in your MCR file. At a minimum for your purpose you will probably want to implement two events (described there as well): OnShouldCreate (to check if the file is a *.svg file) and OnInitialize (to pass the path for the file to the control and to tell the control how large to draw itself). That latter event would be mandatory.

    Note that we have found embedding the Adobe SVG Viewer directly into XMetaL Author (or any other application other than its intended purpose as a plug-in for IE) is troublesome. So, instead of doing that we embed the Windows WebBrowserControl (the ActiveX version of IE) which in turn automatically loads the Adobe SVG Viewer (if installed) when asked to load an SVG file.


  • You must be logged in to reply to this topic.

Lost Your Password?