Thu, May 3, 2018 (latest change)
The de·caff Viewer version 3.x is a Java based program for viewing AutoCAD® DWG, DXF and SHX files.
It can be used on any computer with a Java Runtime Environment installed. Usage is free, see License for more info.
DXF, DWG and SHX are formats created by AutoDesk, Inc. for their AutoCAD® programs family.
- DWG is the native file format for Autodesk’s AutoCAD® software and is a trademark of Autodesk, Inc.
- DXF (Data eXchange format) was designed for simplifying exchange with other CAD programs, although nowadays it does no longer fulfill this promise.
- SHX (compiled shapes) is an old font format still used by AutoCAD® related software.
Current version is 3.09.08 from May 3, 2018.
To run the viewer you’ll need a Java Runtime Environment installed. Minimum required version is 1.7.
On Windows you can put the file caffviewer.jar anywhere you want and double-click it to start it.
On other operation systems you might also be able to double-click, otherwise you can use the following command line to start it:
java -jar caffviewer.jar
To improve the memory available for the program you should add a parameter like
java -mx3g -jar caffviewer.jar
This will start the viewer allowing it to use a maximum of 3GByte of memory, which is a good value for a machine with 4GByte installed. It will only work with a 64bit Java installation.
If you like you can append DXF or DWG files to the given command line. These will be immediately loaded.
Recognizing Memory Problems
There is a memory usage indicator in the status bar which shows you how much memory the viewer has allocated and how much of it it is using. If this indicator gets dark red the viewer’s memory is nearly exhausted which will slow down performance dramatically.
Getting an error box displaying “java.lang.OutOfMemory” is the fatal sign. There’s not enough memory available for the operation you are currently running (probably loading a file).
If you have several files open you can close some of them to free memory. The newly freed memory does not show directly in the memory indicator, but it will after the next garbage collection is run. Garbage collection is done automatically so you don’t have to care, but you can enforce one if you click on the memory indicator.
Allowing for More Memory
Basically to be able to use all your machine’s memory you should use a Java 64bit installation on a 64bit operation system. With 32bit Java you’ll always be restricted to some 1.5 GBytes.
Switch On Automatic Restart
In the Miscellaneous tab in the Settings dialog (found in the Options menu) there is a Restart the viewer with improved memory settings? option. If you enable this setting the viewer will try to restart itself with improved memory settings. Effectively it is started twice this way, but modern Java handles this very well, so you’ll hardly notice it.
Use a Script to Start The Viewer
This works well to give one program (e.g. the viewer) more memory. Basically just create a script which calls
java -mx1400m -jar caffviewer.jar
When you call this script it will start the viewer with 1400MBytes of memory,
which is a good value for 32bit-Java installations on a machine with at least
2GByte of memory. You can also use a
g instead of a
m to indicate GBytes,
so with a 64bit-Java and 8GBytes of physical memory
java -mx6g -jar caffviewer.jar
is a good start.
You can find out whether the viewer is running on a 32bit or 64bit Java by checking the first row of the Java tab in the About dialog.
Allow All Java Programs To Use More Memory
The Java Control Panel (JCP) which comes which each Java installation allows to generally set parameters for all Java applications, including the maximum of memory they are allowed to use. In Windows you’ll find it in the Settings, on other operation systems you might have to search for a program called ControlPanel.
Start it and switch to the Java tab. Click the View… button.
This will open a dialog titled Java Runtime Environment Settings.
Here you can add Runtime Parameters for each Java version installed on
your system. Generally some 75% of yxour physical memory is a good value,
but for 32bit Java there is an upper limit, so you should never exceed
1400MB. As above the upper memory level is set with the switch
directly followed by the amount of memory, which you can postfix with
m (MBytes) or
g (GBytes). So for a 32bit Java on a machine with
at least 2GByte of physical memory insert the following into the
Runtime Parameters column for each Java installed on your machine
For a 64bit Java and 8GByte of physical RAM you can use
You can find out whether the viewer is running on a 32bit or 64bit Java by checking the first row of the Java tab in the About dialog.
(Java) Security Issues
You may have heard about Java being unsecure in the press. This is true for Java running inside your browser like Applets or Java Web Start (JWS). In that case Java tries to shield your computer from harm, but it had problems fulfilling that promise to 100% in the past. So if you don’t need to run Applets or JWS programs you definitely should disable Java in your browser.
The de·caff Viewer is like any program you run locally on your machine: it may do anything you can do. As with any program you download from the internet you’ll have to trust its provider. There is nothing much else shielding you from harm, and things you get for free should raise your caution.
I make my living as a freelancing programmer selling my time and also licenses for libraries and source code to other companies. The idea behind the viewer you can download here for free is that it is a good tool to show what I can provide.
At the moment there is no applet version of the viewer like my old DXF Viewer provides. The simple reason is that I consider Applets a doomed technology.
If there is any interest let me know if you consider otherwise. But be prepared that this will not come for free.
The viewer is not Open Source, but the usage of the viewer is free of any charge. You may download it and use it at your own risk. Although doing my best to make it a useful tool there is no guarantee for this.
3rd Party Code
The viewer uses a few Open Source libraries. They run under the following licenses.
Apache 2.0 License
For unpacking files packed with bzip2 code from the Apache Ant project extracted by Kohsuke Kawaguchi is used. For displaying WMF (Windows Meta File) data code extracted from the Apache Batik project is used. Both are provided under the Apache 2.0 License. Thanks a lot!
Public Domain Code
For displaying files dragged on the viewer FileDrop by Robert Harder is used. It’s in the public domain. Thank you, Robert!
For displaying balloon tool tips the BalloonTip library by Bernhard Pauler and Tim Molderez is used. It is provided under the following license:
Copyright © 2011 Bernhard Pauler, Tim Molderez All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Balloon tip Developer Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE BALLOON TIP DEVELOPER TEAM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Thank you, Bernhard and Tim!
Source Code and Libraries
If you are a company interested in supporting DXF and DWG in your won Java application you can license various libraries and even the complete source code of the viewer.
See Licensing Information for more.
The viewer does not automatically check for updates, but you can enable this in its settings (Options > Settings > Automatic Update). If you enable automatic updates, the viewer will on each start download a small file from this server which contains current version information. Depending on the settings you chose it will either inform you about new versions or download them silently.
Supported AutoCAD® Features
There are various undocumented features in AutoCAD®, so full support is nearly impossible. The viewer does its best, and it is constantly improving.
Supports textual and binary DXF format from the version written by AutoCAD® R7 up to 2018.
Supports DWG from the version written by AutoCAD® R13 up to 2018.
Supports SHX (binary shape files) in all known formats.
Call for Test Data
AutoCAD 2018 was released in March 2017. Sample files in this in other formats are very welcome for testing. AutoCAD has a 35 year history and its formats are very complex with a lot of quirks, so the more test data the better.
Entities are the drawable items in AutoCAD® like lines or arcs.
|3DSOLID||NO||R13||One of the encrypted and undocumented ACIS based entities. See ACIS Based Entities comment below.|
|ACAD_PROXY_ENTITY||NO||R13||Used to support entities from newer versions. Not supported yet, but on the todo list.|
|ACIDBLOCKREFERENCE||yes||R13?||Inserted by the Inventor package, but similar enough to INSERT to be supported.|
|ATTDEF/ATTRIB||yes||*||Originally single line text (like TEXT), but newer versions also allow multi-line (like MTEXT).|
|BODY||NO||R13||One of the encrypted and undocumented ACIS based entities. See ACIS Based Entities comment below.|
|BLOCK||yes||R7||External references (XREF) are not yet supported, but on the todo list.|
|DIMENSION||yes||R7||Rendering just uses the redundant dimension BLOCK.|
|HELIX||NO||2007||Not yet supported due to lack of test data, seems to be rarely used.|
|IMAGE||yes||R13||Inserts an external image file, so file has to be available and understood by Java.|
|LIGHT||NO||2007||Viewer currently just renders wireframe, so there’s no lighting.|
|MULTILEADER||yes||2007||Complex entity, test data is welcome!|
|MTEXT||yes||R13||Fonts need to be available for correct rendering.|
|OLEFRAME/OLE2FRAME||yes||R13||Tries to extract the preview image and render that.|
|RAY||yes||R13||Line with infinite extension in one direction.|
|REGION||yes||R13||One of the encrypted and undocumented ACIS based entities. See ACIS Based Entities comment below.|
|SECTIONOBJECT||NO||2007||Not yet supported due to lack of test data, seems to be rarely used.|
|SHAPE||yes||*||The accessed shape file (.SHX) has to be accessible.|
|SUN||NO||*||Viewer currently just renders wireframe, so there’s no lighting.|
|SURFACE||NO||2007||One of the encrypted and undocumented ACIS based entities. See ACIS Based Entities comment below.|
|TABLE||yes||2004||Rendering just uses the redundant table BLOCK.|
|TEXT||yes||*||Fonts need to be available for correct rendering.|
|TOLERANCE||yes||R13||Fonts need to be available for correct rendering.|
|UNDERLAY||NO||2004||Inserts just another format like PDF, DWF or DGN.|
|XLINE||yes||R13||Line with infinite extension in both directions.|
ACIS Based Entities
Starting with R13 AutoCAD® uses a 3rd party library for specialized 3D operations. The entities which wrap this library are
These entities are stored in a completely different format, which is even encrypted. The format itself is quite complex, and some of its features require complex mathematical operations, which makes complete support difficult. Therefore at the moment only REGION is supported, because it uses only the subset of the whole format which is necessary for 2D objects.
|Annotation Scales||NO||Displays only parts of the model which fulfill a given scaling criteria.|
|Color||yes||Support includes all possible color formats.|
|Invisible Entities||yes||Individual entity invisible can be globally switched off.|
|Line Type||yes||Includes extended line types with texts and shapes.|
|Line Width||yes||This is a varying width possible for LWPOLYLINE and 2D POLYLINE entities.|
|Line Weight||yes||Line Weight is a physical line width for layouts, and a view width independent from zoom factor for models.|
|Material||NO||Viewer currently just renders wireframe, so there’s no use for materials.|
|Reordering||yes||Reordering means that entities are drawn in an order different from the one in which they are defined in the file.|
|Spatial Filtering||NO||Spatial filtering is used to clip away parts of the model, although it is often just used to draw a frame without any actual clipping.|
|Views||yes||Views in DXF come in various flavors: VIEWs, VPORTs, VIEWPORTs, LAYOUTs and Paper Space. All of these are supported, but currently only with rectangular clipping.|
|External References||yes||Embedding of other DWGs in a drawing.|
The de·caff Viewer is the successor of my de·caff DXF Viewer, for which implementation started in 1996. So it celebrated its 20th birthday in 2016. Time for a good program to retire, and make place for something new.
|3.09.08||Thu May 3 18:38:50 CEST 2018||Bugfix Release
|3.09.07||Sun Dec 24 16:30:26 CET 2017||Bugfix Release
|3.09.06||Fri Dec 22 15:48:56 CET 2017||Bugfix Release
|3.09.05||Fri Dec 8 15:00:05 CET 2017||Bugfix Release
|3.09.04||Tue Nov 21 15:49:53 CET 2017||Bugfix Release
|3.09.03||Sat Nov 18 18:19:26 CET 2017||Bugfix Release
|3.09.02||Mon Nov 13 18:37:28 CET 2017||Bugfix Release
|3.09.01||Thu Nov 9 14:40:24 CET 2017||Bugfix Release
|3.09.00||Mon Nov 6 19:00:52 CET 2017||Feature Release
|3.08.00||Thu Nov 2 18:10:29 CET 2017||Feature Release
|3.07.13||Fri Oct 20 08:41:17 CEST 2017||Bugfix Release
|3.07.12||Thu Oct 19 16:43:30 CEST 2017||Bugfix Release
|3.07.11||Fri Sep 15 16:24:57 CEST 2017||Bugfix Release
|3.07.10||Sun Jul 23 19:19:16 CEST 2017||Bugfix Release
|3.07.09||Sun Jul 23 17:02:20 CEST 2017||Bugfix Release
|3.07.08||Mon Jul 17 15:39:12 CEST 2017||Improvement Release
|3.07.07||Thu Jun 29 14:03:45 CEST 2017||Internal Improvement Release
|3.07.06||Tue May 23 16:53:58 CEST 2017||Bugfix Release
|3.07.05||Fri May 5 21:09:27 CEST 2017||Bugfix Release
|3.07.04||Wed May 3 15:05:10 CEST 2017||Bugfix Release
|3.07.03||Sat Apr 29 22:13:01 CEST 2017||Bugfix Release
|3.07.02||Mon Apr 24 17:49:07 CEST 2017||Bugfix Release
|3.07.01||Tue Apr 11 16:05:10 CEST 2017||Bugfix Release
|3.07.00||Mon Apr 10 20:43:51 CEST 2017||Feature Release
|3.06.11||Fri Apr 7 18:26:29 CEST 2017||Bugfix Release
|3.06.10||Thu Apr 6 17:38:30 CEST 2017||Bugfix Release
|3.06.09||Wed Apr 5 14:33:44 CEST 2017||Internal Improvements Release
|3.06.08||Mon Mar 20 17:58:28 CET 2017||Bugfix Release
|3.06.07||Fri Mar 17 16:34:44 CET 2017||Bugfix Release
|3.06.06||Tue Mar 14 14:41:25 CET 2017||Feature Release
|3.06.05||Fri Feb 17 11:15:15 CET 2017||Bugfix Release
|3.06.04||Fri Jan 20 15:31:31 CET 2017||Bugfix Release
|3.06.03||Fri Dec 16 17:08:48 CET 2016||Bugfix Release
|3.06.02||Wed Nov 16 14:29:02 CET 2016||Bugfix Release
|3.06.01||Fri Nov 11 15:39:21 CET 2016||Bugfix Release
|3.06.00||Thu Nov 10 13:54:17 CET 2016||Feature Release
|3.05.06||Mon Nov 7 16:12:37 CET 2016||Bugfix Release
|3.05.05||Tue Nov 1 14:38:19 CET 2016||Bugfix Release
|3.05.04||Sun Oct 30 16:03:46 CET 2016||Bugfix Release
|3.05.03||Fri Oct 28 14:03:18 CEST 2016||Bugfix Release
|3.05.02||Thu Oct 27 22:36:19 CEST 2016||Maintenance Release
|3.05.01||Tue Oct 11 14:47:42 CEST 2016||Bugfix Release
|3.05.00||Mon Oct 10 20:25:48 CEST 2016||Feature Release
|3.04.02||Fri Sep 30 11:21:35 CEST 2016||Feature Release
|3.04.01||Wed Sep 14 12:54:13 CEST 2016||Bugfix Release
|3.04.00||Tue Aug 30 12:31:46 CEST 2016||Feature Release
|3.03.06||Sun Aug 14 15:56:45 CEST 2016||Bugfix Release
|3.03.05||Fri Aug 12 16:32:04 CEST 2016||Bugfix Release
|3.03.04||Thu Jul 21 14:22:10 CEST 2016||Bugfix Release
|3.03.03||Wed Jul 20 12:36:54 CEST 2016||Bugfix Release
|3.03.02||Sun Jul 17 14:26:03 CEST 2016||Bugfix Release
|3.03.01||Wed Jul 13 19:57:34 CEST 2016||Bugfix Release
|3.03.00||Mon Jul 11 17:18:55 CEST 2016||Feature Release
|3.02.05||Sun Jun 26 15:37:16 CEST 2016||Bugfix Release
|3.02.04||Mon Jun 20 12:11:33 CEST 2016||Bugfix Release
|3.02.03||Sun Jun 19 18:37:04 CEST 2016||Bugfix Release
|3.02.02||Sun Jun 19 16:27:10 CEST 2016||Bugfix Release
|3.02.01||Sat Jun 18 15:49:00 CEST 2016||Bugfix Release
|3.02.00||Fri Jun 17 14:41:18 CEST 2016||Feature Release
|3.01.03||Mon Jun 13 15:19:56 CEST 2016||Improvement Release
|3.01.02||Fri Jun 10 16:08:21 CEST 2016||Bugfix Release
|3.01.01||Tue May 31 15:45:33 CEST 2016||Bugfix Release
|3.01.00||Wed May 25 15:01:39 CEST 2016||Feature Release
|3.00.02||Tue May 24 19:32:37 CEST 2016||Bugfix Release.
|3.00.01||Tue May 24 14:18:09 CEST 2016||Bugfix Release.
|3.00.00||Fri May 20 13:57:33 CEST 2016||First release.|