DWF Toolkit changes
The changes DWF View makes to the Autodesk DWF Toolkit, published for other developers.
What the DWF Toolkit is
The DWF Toolkit is the C++ library that Autodesk, Inc. published so that other programs can read and write DWF and DWFx files. DWF View includes it, in binary form, to open these files.
- Base version: DWF Toolkit 7.7, as kept in the public repository github.com/kveretennicov/dwf-toolkit, commit
fd1e809. - License: the DWF Toolkit License Agreement from Autodesk, Inc. Clause 1.1.2 (b) asks anyone who modifies the toolkit to publish the specification of the changes for third-party developers. This page does that.
- The copyright notices of the toolkit and of the components inside it are in the app, under Third-Party Notices: on the Mac in the DWF View menu, on the iPhone and iPad on the start screen.
The changes
Most changes make code written in the 2000s for 32-bit Windows and PowerPC Macs work on today's 64-bit systems and compilers. None of them changes the toolkit's programming interface or the DWF file format.
- Numbers in classic DWF graphics (W2D). The toolkit read 4-byte integers using the size of the C type
long, which is 8 bytes on 64-bit Apple systems, so coordinates and other values came out wrong. Coordinates, line weights and 32-bit values are now always read as exactly 4 bytes. Files:whiptk/file.cpp,whiptk/lweight.cpp. - Byte order on Apple processors. The toolkit assumed that every Mac is big-endian, as PowerPC Macs were. It now takes the byte order from the compiler, so Intel and Apple silicon are read as little-endian. File:
whiptk/whipcore.h. - Error messages. Copying an error message cleared only 2 bytes of the closing zero, which assumes the 2-byte
wchar_tof Windows. On Apple systemswchar_thas 4 bytes, and messages came back with stray data at the end. A whole character is now cleared. File:dwfcore/Exception.cpp. - Current compilers. Small changes so that the code builds with current versions of Clang and libc++: template members called through
this->, standard C and C++ headers instead of an internal GCC header, and theBytetype of zlib always defined. Files:dwfcore/Vector.h,dwfcore/mac/Core.h,dwfcore/zlib/zconf.h. - Current macOS and iOS interfaces. Atomic counters use C11 atomics instead of the retired
OSAtomicfunctions, and the timer usesmach_absolute_timeinstead of the CarbonUpTimefunction, which no longer exists. Files:dwfcore/mac/Core.cpp,dwfcore/mac/Timer.cpp. - Memory paging. The memory manager used an in-memory SQLite store that fails on iPhone and iPad hardware. It now uses the toolkit's own file-based store, in a temporary file that is deleted when it is no longer needed (at once where the system allows it, otherwise when the program ends). The temporary folder and the path separator follow the system, including Windows. File:
dwfcore/paging/MemoryManager.cpp. - Damaged files. When a damaged DWFx package has a part that cannot be read, the toolkit now reports an error instead of reading through an empty reference and closing the app. A section or resource without a name, type or address, a colour with fewer than three numbers and a missing number in an attribute are now ignored or read as zero, instead of closing the app. Files:
dwf/opc/RelationshipContainer.cpp,dwfcore/XMLParser.cpp,dwf/package/Manifest.cpp,dwf/package/SectionBuilder.cpp,dwf/package/Paper.cpp,dwf/package/reader/EPlotSectionDescriptorReader.cpp,dwf/package/utility/ResourceContainer.cpp,dwfcore/ansi/String.cpp. - No 3D. DWF View shows 2D drawings only, so the 3D streaming component (w3dtk) and the 3D presentation classes that depend on it are not built. When
DWFTK_SEM_W3Dis defined, the content presentation reader reads a 3D model view node as a plain reference node and skips its 3D settings (camera, matrices, colours, cutting planes). Files:dwf/presentation/reader/ContentPresentationReader.cpp,dwf/package/XML.cpp. - Microsoft Visual C++. Two standard headers included where the code uses them, because that compiler does not bring them in through other headers. File:
dwfcore/paging/Archive.h. - Housekeeping. One blank line removed in
whiptk/image.cpp.
Patch file
All the changes, as a unified diff against commit fd1e809, with paths relative to the root of the toolkit (for example, git apply in a copy of that commit).
Trademarks
DWF and DWFx are trademarks of Autodesk, Inc. DWF View is not made, sponsored or endorsed by Autodesk, Inc.
Last updated: 11 November 2026