Select Page

Creating a DWF file is simple. Adding it to a Web page can be a bit more work. This section will assume that you are familiar with the creation and editing of HTML documents. HTML stands for Hypertext Markup Language, but don’t let the fancy title scare you. The fundamentals of HTML are really quite easy to learn. If you need to know more about HTML, check out HTML: No Experience Required (Sybex, 1997). Now let’s proceed with the instructions.

If you want to just embed a DWF file in your HTML file, you can add the following line to your HTML file and the DWF file will appear in the browser .

Replace drawingname. dwf with the name of your drawing. The width and height specifications can be whatever you want them to be. If you want to add all of the bells and whistles to your D- document, you can do the following.

1. Open your HTML document, either in a word processor or in a Web page creation program.

2. Insert the following code in the location where you want the DWF file to appear.

This code includes all the data required for both Netscape Communicator and Microsoft Internet Explorer. You’ll want to keep the code for both browsers in your HTML file so that users of both browsers can view your drawings.

This example contains some generic code. You’ll want to make a few changes to it to make it applicable to your specific DWF file. The items in italics are the ones you will want to change. Let’s look at them one by one so you know exactly how to replace them in your file.

Determining Files and Opening Views

As you scan’ down the code, you’ll see two lines labeled width-and height:

height=300 >

These two lines are for the benefit of Microsoft Internet Explorer. The numeric values in this bit of code determine the size of your drawing in the Internet Explorer window. They describe the width and height in pixels. You can replace the numbers here to whatever value you want, but keep them in a range that will fit neatly in a typical Web page format.

The next set of lines determines the actual filename and opening view for the DWF file.

The first three lines shown here are for Microsoft Internet Explorer. In the first line, replace the italicized letters with your own .dwf filename. You can also specify a URL to a .dwf file at another location.

The next two lines describe the view name to which Internet Explorer is to open the .dwf file, or the actual coordinates for the opening view. Use one or the other, but don’t use both view parameters.

The fourth line is for the benefit of Netscape Communicator. Again, you enter the name of the .dwf file here in place of the drawing name .dwf letters. You’ll also see name = drawing name. This lets you identify the drawing with Java and JavaScript applications. You can replace the italicized name with your own name. Also, it doesn’t have to be the drawing name.

Further down the listing you will see the width, height, and view parameters repeated:

This set of parameters is intended for Netscape Communicator users and should match the data you provide for Microsoft Internet  Explorer in the previous set of lines.

Your Internet Provider Needs to Know…

Finally, whether you are using an Internet provider or an in-house Web server, your server will need to be able to recognize the .dwf file type. You will need to inform your Webmaster that you intend to use the .dwf file in your Web page. The Webmaster then needs to add the MIME type of “drawing Zx. dwf” to the Internet server. This registers the .dwf file type with the Internet’ server software enabling others to view your drawings online.

Share This