libdxfrw is a free C++ library to read and write DXF files in both formats, ascii and binary form.