Embedding Vector Images in HTML

SVF, AutoCAD drawing, and DXF files can be embedded in any HTML document. Through hyperlinks and notifications in SVF, you can display other images or documents, toggle layers, and turn on or off user interface features.

To embed a vector image in an HTML document, you specify the name of the image and the size (in pixels) of the image on the page. Alternately, the width and height can be a percentage of the screen followed by '%'. Any of the optional tags can also be included inside the angle brackets. For example:

<embed src=drawing.dwg width=200 height=200>
<embed src=http://www.softsource.com/image.svf width=400 height=400>
<embed src=file.dxf width=300 height=200 layeron=a,b layeroff=c,d,e>
<embed src=drawing.dwg width=30% height=40% view=extents background=inverse>
<embed src=drawing.dwg width=30% height=40% pluginspage="http://www.softsource.com/plugins/plugins.html">

MIME Types

A MIME type is how an Internet application or browser (e.g., Netscape Navigator or Microsoft Internet Explorer) identifies the type of file it is dealing with. This is similar to associating an application with a file on a Macintosh or associating a program with a file extension under Windows. In order for a browser to recognize SVF, AutoCAD drawing, and DXF files so the appropriate action can take place (e.g., for the proper plug-in to be run in Netscape), the server needs to have a MIME type associated with the proper files. Contact your system administrator for more information on how to do this.
extensionsOld MIME typesNew, Official MIME types
SVF .SVF or .svf image/x-svf image/vnd.svf
AutoCAD drawing.DWG or .dwgimage/x-dwg image/vnd.dwg
DXF.DXF or .dxfimage/x-dxfimage/vnd.dxf

NOTE: On April 4, 1996 the IANA (Internet Assigned Numbers Authority) officially registered the following new Media Types, content-type/subtype pairs to SoftSource: image/vnd.svf, image/vnd.dwg, and image/vnd.dxf. Here is more information about the IANA. The SoftSource plug-ins support both the old and new MIME types.

After adding MIME types, your server may need to be restarted. Additionally, Netscape may have cached any images and associated MIME types you have previously viewed, so you may need to clean out the local cache before retrying images.

Optional Tags

You can specify a list of layer names which can be turned on or off.
With the drawing/DXF plug-in, the image is initially displayed using the same view that was in effect when the drawing was last saved. You can have it displayed to the extents saved in the file.
With the drawing/DXF plugin, you can specify a named view that has been saved in the drawing.
The drawing/DXF plugin defaults to a black background for the image. You can specify a light background instead.
If you need to simply display a short text message to the user, you can use the status tag to show the message on the status bar. Put quotes around the message if it contains spaces.
status="This is a short message."
Various user interface features can be turned on or off. Zoom, pan, and the layer list are normally available through the right mouse button popup menu. These can be disabled through the following tags:
With SVF, the left mouse button usually activates a hyperlink or zooms to the cursor. To disable link activation, use the following tag:
When the left mouse button is moved over a hyperlink, most browsers display the associated URL on the status bar. An SVF hyperlink can also contain text which appears on the status bar in place of the URL. This can aid in understanding what the link will do since URLs may look cryptic. To have the URL always displayed, you can turn off this feature with the following tag:
When a user does not have either the DWG/DXF or SVF Plug-ins and views a document with embedded .DWG/.DXF or .SVF files they can be directed to our web site to immediately download our plug-ins. To do this you must include the following tag:

Hyperlink Syntax

The text in an SVF hyperlink can be an URL and/or any of the optional tags. The following are examples of valid links.
image.svf layeroff=Buildings,Cities layers=false

Notification Syntax

SVF notifications are essentially hyperlinks which get activated when the user passes a certain magnification level. The syntax is the same as for hyperlinks with one addition - the location of the current view can be passed to the URL. For example, if you had an image that contained a map and you wanted a new more detailed map sent once the user had zoomed past the level of detail, you would need to know where the user had been. If the notification fires the following URL...
...the plug-in would turn it into...
...if (1000,1000) was the center of the current view and 400 was the width. A CGI script on the server could then parse this and send the proper new file.
Related pages...
*SVF Technical Information
*SVF Specification
*SVF Syntax