You’ve been able to embed code in web pages to enable DWF file viewing using Microsoft Internet Explorer for a long time. (How do I embed a DWF file in an HTML page?)
Now by popular demand, the Autodesk team has created the Firefox Add-on for Autodesk® Design Review that enables DWF file viewing in Mozilla Firefox™ 3 for Windows.
To take advantage of this new functionality,
- Install Firefox or one of the other non-IE browsers mentioned above. The add-on requires one of the aforementioned browsers or it won’t install.
- Download and install the add-on.
- The web pages containing the DWF files to be viewed must contain the proper embedding code that recognizes the add-on.
- Take the add-on for a test drive.
Assuming you already have a non-Internet Explorer browser installed, let’s start with the installing the add-on.
To install the Firefox Add-on for Autodesk® Design Review
- Download the ADRFFInstaller.zip from the Autodesk Labs site here.
- Close all open browser windows.
- Double-click ADRFFInstaller.msi and follow the prompts to install to the add-on.
You can remove the add-on at any time by uninstalling ”ADRFF” from Windows list of programs in the Control Panel.
Next prepare the web pages for embedding DWF files.
Important: File names in URLs are case-sensitive.
To embed a DWF or DWFx file in an HTML page to be viewed in Firefox
- Create or obtain the DWF file that you want to embed.
- Copy the DWF file to desired location.
- Create an HTML file.
- Copy the following code and paste it into your HTML file between the <BODY> </BODY> tags.
<OBJECT ID="ADR" TYPE="application/x-Autodesk-DWF" WIDTH="600" HEIGHT="450">
<PARAM NAME="dwffilename" VALUE="http://[]]"/>
</OBJECT>
How It Works
- The width, and height parameters determine the appearance of the DWF file on the web page. If you change the width, and height values, use static values instead of percentages; percentages may distort the content if printed.
- [[ServerPath]] is the complete path or URL of the DWF file to be embedded.
Here’s a sample that targets a DWF file stored on a web server:
<OBJECT ID="ADR" TYPE="application/x-Autodesk-DWF" WIDTH="600" HEIGHT="450">
<PARAM NAME="dwffilename" VALUE="http://www.autodesk.com/global/dwf/samples/multiple_layouts_large.dwf"/>
</OBJECT>
Here’s a sample that targets a DWF file stored on a local shared hard drive:
<OBJECT ID="ADR" TYPE="application/x-Autodesk-DWF" WIDTH="600" HEIGHT="450">
<PARAM NAME="dwffilename" VALUE="c:\dwfs\myfile.dwf"/>
</OBJECT>
Important: Because this code only works for non-Internet Explorer browsers, you may want to include some kind of JavaScript browser detect code to ensure the visitor’s browser serves up the appropriate HTML.
Finally, test your work by opening the HTML file in Firefox or another browser to ensure the DWF file can be viewed by visitors to your web page. Visitors will need to have the add-on as well as a Design Review installed to view the DWF files.
Thank you to the entire Simulation team for making this available to our customers.
-Volker