Free Support Forum -

Getting a CAD drawing into a Word document

I’m trying to come up with a way to take a CAD image (in Autodesk .DXF format) and place it into a Word document via Aspose.Words for Java. So far, the only thing that has worked is to use Kabeja to load the DXF, and convert it into PNG (slow and wasteful, especially when it’s a large drawing and you want 600 dpi).

Kabeja can convert to SVG (which is much faster), but Aspose.Words doesn’t understand SVG.

If I could find something that could convert the SVG to an EMF or WMF file I could do that, but Google is beyond useless when searching for such things (9 out of 10 links go to link farms and dodgy download sites, or so it seems).

One library I found at turned out to be a dead end; it doesn’t account for the possibility of floating-point numbers in SVG files (and thus immediately chokes on Kabeja’s output).

FreeHEP has a vector graphics package that saves to EMF, but it’s meant for taking objects drawn in Swing components such as JPanel and saving them to EMF, not for file format conversion.

Any other ideas?

Hi there,

Thanks for your inquiry.

I’m afraid Aspose.Words doesn’t natively support inserting CAD drawings. However, your proposed solution to convert such an object to a regular image is the right way to go.

Since you are having troubles with PNG format, I think you’ll be happy to know that we are currently working on support for SVG images during import (mainly for HTML import). Once complete you should be able to insert SVG images into a document. Hopefully this solves your problem.

We will inform you as soon as there are any developments regarding SVG import.


The issues you have found earlier (filed as WORDSNET-6207) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

I finally managed to try Aspose.Words for Java 11.9.0 and 11.10.0, and it’s not working for large CAD drawings. If I use a small test SVG, it works fine, but with the CAD drawing I end up with a blank picture in my document; no exceptions are thrown. The SVG that was generated by Kabeja is about 778KB, and the output (.DOC, .DOCX, or .ODT) ends up at about 4 to 7KB depending on format.

The smaller SVG is about 24K, and the output docs using it reflect that size.

The CAD drawing SVG loads up in Inkscape without trouble.

I’ve tried the JDK 1.4 and 1.6 versions of the library, both 11.9.0 and 11.10.0.


Thanks for your inquiry. Could you please attach your sample SVG here for testing? I will investigate the issue on my side and provide you more information.

Best regards,

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan