CF2 files are CAD drawings containing 2D or 3D data. In some cases, you may need to create DWFX or DWF images to display the file contents in a picture. In accordance with such use cases, this article covers how to convert a CF2 file to an DWF or DWFX image programmatically in C#.
- CF2 to DWF or DWFX Image Converter – C# API Installation
- Convert CF2 to DWF Image Programmatically in C#
- Convert CF2 to DWFX Image Programmatically in C#
CF2 to DWF or DWFX Image Converter – C# API Installation
Aspose.CAD for .NET API supports converting CF2 and many other file formats. Simply configure the API by downloading its DLL file from the Downloads section or with the following NuGet installation command:
PM> Install-Package Aspose.CAD
Convert CF2 to DWF Image Programmatically in C#
You can convert a CF2 file to an DWF image by following the steps below:
- Load the source CF2 using the Image class.
- Create an instance of CadRasterizationOptions class.
- Set properties like size of the output image.
- Save the output DWF image.
The code snippet below explains how to convert a CF2 file to an DWF image in C#:
Convert CF2 to DWFX Image Programmatically in C#
You can convert a CF2 file to a DWFX image with the following steps:
- Load the input CF2 file with the Image class.
- Create an instance of CadRasterizationOptions class.
- Initialize an object of DwfxOptions class.
- Save the output DWFX image.
The following code snippet shows how to convert a CF2 file to a DWFX image programmatically in C#:
Get Free Temporary License
You can test all the features of the API without any evaluation limitations by requesting a free temporary license.
Conclusion
In this article, you have learned how to convert a CF2 file to an DWF or DWFX image. Moreover, you can explore several other features offered by the API by visiting the documentation section. In case of any concerns, please feel free to write to us at the forum.