Introduction
The DWF® Toolkit provides APIs for reading and writing 3D DWF from any application, simplified 2D interfaces, supports composite DWF files (3D and 2D combined) and cross-platform support (Windows, Mac, Linux). It includes C++ source code for reading and writing DWF files. The 7.2.1 version of the toolkit handles DWF files generated by AutoCAD 2007 and other Autodesk design software applications.
Audience
- If you are a Visual Basic or JavaScript programmer interested in working with the API associated with the Autodesk DWF Viewer and Autodesk Design Review, then you should visit the Autodesk Developer Center. There is a compiled HTML help file that describes that interface.
- The DWF Toolkit is intended for hardcore C++ programmers who wish to build their own applications.
Contents
Though this download is referred to as the "DWF Toolkit" to reference its all encompassing name, the download package actually consists of four toolkits:
- DWF Core - toolkit that provides platform independence. This includes base items like strings and operations like file i/o.
- DWF Toolkit - toolkit that handles DWF files as packages. This includes XML used to describe the contents.
- WHIP Toolkit - toolkit that handles 2D streams
- W3D Toolkit - toolkit that handles 3D streams
Support
- When downloaded from the web, the DWF Toolkit is provided on an as-is basis. There is no direct support from Autodesk.
- Peer to peer support is available in the Autodesk DWF discussion group.
http://discussion.autodesk.com/forum.jspa?forumID=114
news://discussion.autodesk.com/autodesk.dwf - Additional information is available in the "DWF Programming" category of Beyond the Paper DWF Blog. A list of samples appears as a posting to the blog.
Structure
The directory structure for the DWF Toolkit is divided into various sections.
Section Directories Description Build
develop\global\build\gnu
develop\global\build\VC 7.0
develop\global\build\VC 7.1
develop\global\build\VC 8.0
develop\global\build\XCode
develop\global\build\XCode 1.5 These are the solution, project, and make files for the various compiler versions. Resources
develop\global\rc\core
develop\global\rc\dwf\w3dtk
develop\global\rc\dwf\whiptk These are the resource files for the Microsoft compilers. Source
develop\global\src\dwf\expat
develop\global\src\dwf\package\reader
develop\global\src\dwf\package\utility
develop\global\src\dwf\package\writer
develop\global\src\dwf\presentation\reader
develop\global\src\dwf\presentation\utility
develop\global\src\dwf\publisher\data
develop\global\src\dwf\publisher\impl
develop\global\src\dwf\publisher\model
develop\global\src\dwf\publisher\plot
develop\global\src\dwf\publisher\win32
develop\global\src\dwf\w3dtk\hoops
develop\global\src\dwf\w3dtk\jpeg
develop\global\src\dwf\w3dtk\utility
develop\global\src\dwf\whiptk
develop\global\src\dwfcore\ansi
develop\global\src\dwfcore\digest
develop\global\src\dwfcore\mac
develop\global\src\dwfcore\win32
develop\global\src\dwfcore\x64
develop\global\src\dwfcore\x86
develop\global\src\dwfcore\zip
develop\global\src\dwfcore\zlib These are the source files that comprise the four toolkits. Documentation
docs\DWF Core
docs\DWF Toolkit\html
docs\DWF Toolkit\Specification
docs\DWF Toolkit\W3D\html
docs\DWF Toolkit\W3D\Specification
docs\DWF Toolkit\Whip2D\html
docs\DWF Toolkit\Whip2D\Specification The HTML directories contain descriptions of the C++ code. The Specification directories describe the format of the DWF file itself. If you use the C++ classes properly, you should never need to look at the specifications. Sample Programs
samples\DWFCore\Digest
samples\DWFCore\Files
samples\DWFCore\Strings
samples\DWFCore\Threads
samples\DWFCore\UUID
samples\DWFToolkit\3DPublish
samples\DWFToolkit\Aggregate
samples\DWFToolkit\GlobalSectionWriter
samples\DWFToolkit\ObjectDefinitionReader
samples\DWFToolkit\PublishMetadata
samples\DWFToolkit\ReadContentDefinition
samples\DWFToolkit\SimpleEnumReader
samples\DWFToolkit\SimpleEPlotWriter
samples\DWFToolkit\TimedXMLReader
samples\DWFToolkit\W2dTest
samples\DWFToolkit\WhipExamples
samples\DWFToolkit\WriteContent These sample programs provide examples of reading and writing DWF files.
Getting Started
The best way to become familiar with the DWF Toolkit is to compile and run the supplied sample programs. Because different parts of the DWF Toolkit are used among a variety of departments within Autodesk, each with their own configurations and directory structures, some of the sample programs may not have been supplied with full compilation dependencies. In addition, whether you downloaded source or binary affects how much you may need to compile. The toolkit packages provide configurations for building libraries that read/write DWF files or just read DWF files. Since you may wish to investigate samples that both read and write DWF files, you will want to select a configuration that includes both. Be consistent across toolkits in the configurations that you select for compilation. Though the toolkits have separate read-write and read-only configurations for debug and release, the some of the sample programs themselves only have configurations for debug and release. In the event that a sample requires you to compile the parts yourself:
- Navigate to the "DWFToolkit-7.2.1\develop\global\build" directory (or wherever you have installed the DWF Toolkit).
- Navigate to the subdirectory for your compiler.
- Navigate to DWFCore. Build it.
- Navigate up one level and back down to WhipToolkit. Build it.
- Navigate up one level and back down to W3DToolkit. Build it.
- Navigate up one level and back down to DWFToolkit. Build it.
- Navigate to a desired sample such as "DWFToolkit-7.2.1\samples\DWFToolkit\SimpleEplotWriter." Build it. Run it. Play with it.
- Repeat the previous step for other samples.
Operating Systems and Compilers
Operating System C++ Compiler Status Microsoft Windows (2000, XP)
Microsoft Visual Studio .NET 2002 (MSVC 7.0)
supplied as legacy (untested) Microsoft Visual Studio .NET 2003 (MSVC 7.1)
built and QA tested Microsoft Visual Studio 2005 (MSVC 8.0) Red Hat Enterprise Linux 3.0 (GNU/Linux Kernel 2.4 i686 i386)
gcc 3.2.3
built and QA tested Gentoo Linux (GNU/Linux Kernel 2.6 i686)
gcc 3.3.4
built and QA tested gcc 3.4.3 Apple Macintosh OS X (Darwin Kernel 7.5.0 powerpc)
gcc 3.3
built and developer tested (limited) XCode 1.5
Notes for Microsoft Windows
- If you are statically linking on Windows, you need these preprocessor defines:
- DWFTK_STATIC
- DWFTK_BUILD_EXPAT
- DWFCORE_STATIC
- DWFCORE_BUILD_ZLIB
- The Unicode Character set needs to be turned on.
- The multi-threaded DLL runtimes need to be used.
- If you are using Microsoft Visual Studio 2005 (MSVC 8.0), you should set DisableSpecificWarnings="4290".
Notes for Linux
- Makefiles are not supplied for some items such as some of the sample programs.
- Most sample programs consist of only a few files, and makefiles can be constructed quite easily.
DWF Partner Program
- Autodesk recently formalized its partner program as part of the Autodesk Developer Network (ADN). Members of the DWF Partner program get all the benefits that come with membership in the ADN and more, including access to the latest Autodesk design technologies and direct support from Autodesk. When you have joined ADN and have a working solution that you would like to market, please request an evaluation via a form on the Autodesk web site. If your application meets Autodesk's evaluation criteria, you will be invited to join the DWF Partner program. Once you become an official DWF Partner, getting noticed as a DWF Partner and increasing awareness for your products is easy. You will receive access to marketing information that will help you to gain a competitive advantage and highlight your DWF Partner status. What’s more, Autodesk will promote your company and DWF-based products in the DWF Center on www.autodesk.com/dwf-partners.
- If you do not wish to become an official DWF Partner but would like to submit your C++ code to our DWF Samples gallery, you may do so by completing a form on the Autodesk web site.
DWF is an open but proprietary format. PDF is also a proprietary format. There is an ISO standard called PDF-A which is less popular. The PDF files are made from Acrobat are PDF, not PDF-A, and hence are just as proprietary as DWF. PDF is not as open as DWF, because Adobe does not open source their C++ code for reading and writing PDF files. They only publish a format specification. DWF goes beyond just publishing the spec in that Autodesk gives away its C++ source code. DWF is a standard -a de-facto standard - in that it is published, open, and is used by millions of users. It is integrated into hundreds of products from various 3rd party vendors in many industries including reprographics.