Search code examples
autocaddxf

Convert Autocad (DXF) file to transparent image


I would like to convert an Autocad file (DXF) to an image based on the following criteria:

  • I would like to specify the viewport from the autocad file.
  • I would like to specify the width and height of the resulting image in pixel.
  • resulting image need to be transparent PNG.

I'm not an experienced autocad user. Hence, please, explain in simple way. Moreover, if there other tools (for exmaple in Java) that could do similar task please let me know.

Thanking you.


Solution

  • You could convert your DXF to SVG with Kabeja, which is a Java based converter. For SVG to PNG you could use Batik. Depending on your input files converting DXF to non transparent PNG and replace all white with transparency might be the easiest solution.