August 2014

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

« Linking 2D and 3D with the DWF Viewer 7 API | Main | Calling the DWFRender Web Service from HTML »

July 20, 2006

Project Freewheel: Losing Control!

Project Freewheel is a project that was recently launched via Autodesk Labs. It's a technology preview that allows you to share DWF files without the need for installing a client application that includes an ActiveX control for DWF display (such as the DWF Viewer or Design Review).

There are three main features of Project Freewheel that are of interest to developers. Let's take a look at them below.

Embedding a navigable DWF

It's now really simple to embed a DWF file in your web page without forcing a download of the DWF Viewer application. As long as your DWF file is accessible somewhere on the Internet, you can use Project Freewheel's Interactive Software Viewer to allow navigation of your DWF without a component install. Very cool and very easy.

Once your DWF is in a publicly accessible location, you simply use a frame or inline frame tag in your HTML to embed the results of a URL passing the required parameters (in this case we're just passing the location of the DWF):

<iframe src="" width="400" height="300" scrolling="no" frameborder="0" />

Embedding a static image of a DWF

If you merely want a static image, that's easy too. You can use the Rendering Service to serve up a rendered view of a particular sheet from a DWF file. This time we're going to pass in a few more parameters regarding the size of the image and the view target/scale:

<iframe src=" path=" width="400" height="300" scrolling="no" frameborder="0" />

Getting some data regarding a DWF

The last item of interest to developers is the DWFRender Web Service that allows you to query non-graphical information about a particular DWF file. If you're new to web services, I recommend this primer (although it's now slightly dated).

Most interestingly you can use the service to query the number of pages contained in a particular DWF and various information on those pages (name, paper-size, units).

There are a number of approaches you can use to call SOAP web services from HTML using JavaScript, and the one I've used myself in the past is documented here:

It takes a little work to set up - you need to define some local script (typically JavaScript) and make use of an HTC file provided by Microsoft. I would have done it directly from this page, but it's actually quite tricky to do from within a blog - you have to get the HTC file onto the server and try to get the hosted page to call the script properly. Anyway - you can imagine the results: the page would simply have some embedded text representing the number of pages and the page-names, all of which would have been queried from the web service (the calling code would have had to pass in the URL to the DWF, of course).

For more detailed information on how to use Project Freewheel as a developer, please check this page.


TrackBack URL for this entry:

Listed below are links to weblogs that reference Project Freewheel: Losing Control!:

blog comments powered by Disqus


10 Random Posts