.NET AutoCAD API to Easily Process, Convert CAD Files

Develop full-featured apps using the Aspose .NET AutoCAD API to accurately convert DWG, DXF, DWF, DGN, and more CAD and BIM files to PDF, raster images, and vectors.

Download Free TrialView All APIs

Optimize AutoCAD File Processing and Conversion in .NET

Aspose.CAD for .NET is a high-performance API to render, manipulate, and convert CAD and BIM files. This .NET AutoCAD API includes features that enable developers to work with different elements of the CAD drawings. Loaded with excellent CAD file conversion capabilities, Aspose.CAD for .NET allows converting AutoCAD files to multiple formats, such as DWG to PDF, DWG to JPEG, DXF to PDF, and many more. You can optimize the AutoCAD processing workflow using the .NET API and integrate the immaculate rendering abilities into your document processing apps in .NET.

The .NET AutoCAD processing and conversion API offers enhanced memory management and multi-thread file processing. That makes it easy to convert or export files in bulk instead of working on one file at a time. The conversion process is fully customizable and supports tracking the file conversion with the ability to cancel the conversion if needed. It supports multiple OS, development environments, and frameworks offering a cross-platform AutoCAD file conversion experience like no other.

Getting Started

For setting up Aspose.CAD for .NET on your end, please check the information shared below. Please review a list of prerequisites on the System Requirements page before installing the .NET AutoCAD conversion API for a smooth user experience.

Aspose.CAD for .NET Installation

Please download the MSI installer or the DLLs directly from the downloads section to set up the AutoCAD file format conversion API for .NET. Or, you may use the NuGet package for installing the library. The Visual Studio Package Manager Console command is provided below:

PM > Install-Package Aspose.CAD

Mastering AutoCAD to PDF and Raster Image Conversions in .NET

Aspose.CAD for .NET high-fidelity conversion engine allows users to convert CAD drawings to PDF and popular raster images and vectors such as PNG, JPEG, GIF, BMP, EMF, and more. Automating CAD file conversions using the .NET CAD library helps make the process efficient. Developers can proficiently transform CAD file formats into PDF documents without any dependencies.

Effortlessly Convert CAD to PDF in .NET

You can build feature-rich CAD converter applications on the .NET platform using the .NET AutoCAD API. Converting DWG to PDF, DWF to PDF, DGN to PDF, or DXF to PDF is simple and easy. You can apply advanced settings to the output files during the conversion process. Let’s check the following steps and sample code that highlight the conversion of DWF to PDF in .NET.

  • Add and Load the source DWF file in the Image class object.
  • Create an instance of the CadRasterizationOptions class.
  • Set the output PDF file page size.
  • Initialize the PdfOptions class object.
  • Set vectorization options using the VectorRasterizationOptions property.
  • Save the output PDF file using the Save method and the PdfOptions object.
// Load the DWF file in the Image class object
using (Image image = Image.Load("sample.dwf"))
	// Instantiate CadRasterizationOptions class object
	CadRasterizationOptions dwfRasterizationOptions = new CadRasterizationOptions();

        // Set page size
        dwfRasterizationOptions.PageHeight = 500;
        dwfRasterizationOptions.PageWidth = 500;

        // Initialize PdfOptions object
        PdfOptions pdfOptions = new PdfOptions();

        // Set vector rasterization options
        pdfOptions.VectorRasterizationOptions = dwfRasterizationOptions;

        // Save PDF file
        image.Save("output.pdf", pdfOptions);

Convert CAD to raster images in .NET easily

The .NET AutoCAD processing API lets users seamlessly convert CAD drawings to raster images. Different AutoCAD file formats could be programmatically rendered and converted to JPEG, GIF, PNG, BMP, TIFF, and WEBP images within your .NET apps using the .NET AutoCAD conversion API. The information and code snippet shared below show how to convert DWG to JPEG in .NET.

  • Add the source DWG to the Image class object.
  • Set rasterization options for the desired JPEG file.
  • Set the output page size.
  • Apply the background color.
  • Use the VectorRasterizationOptions property to set the rasterization options.
  • Save the converted DWG to JPEG image using the Save method.
//Load the DWG to export to JPEG 
            using (Aspose.CAD.Image image = Aspose.CAD.Image.Load("test.dwg"))
                // Create an instance of CadRasterizationOptions
                Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = 
                    new Aspose.CAD.ImageOptions.CadRasterizationOptions();

                // Set page width & height
                rasterizationOptions.PageWidth = 1200;
                rasterizationOptions.PageHeight = 1200;

                //Set background color and object colors
                rasterizationOptions.BackgroundColor = Aspose.CAD.Color.White;
                rasterizationOptions.DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor;

                // Create an instance of JpegOption for the converted Jpeg image
                ImageOptionsBase options = new Aspose.CAD.ImageOptions.JpegOptions();

                // Set rasterization options for exporting to JPEG
                options.VectorRasterizationOptions = rasterizationOptions;

                // Save DWG to JPEG image
                image.Save("Exported_image_out.jpeg", options);

You can similarly convert DXF or DGN files to JPEG format and to other raster images using the .NET CAD library. Please check more working code samples on the Aspose.CAD for .NET GitHub examples page. If you are looking to view, convert, watermark, or extract metadata and text from AutoCAD files on the fly using your mobile devices, please check out Free Online CAD Files Conversion and Processing Apps.

Integrate CAD File Conversion Features into .NET Applications

Aspose.CAD for .NET API provides convenient workflows to convert, process, and edit AutoCAD files programmatically using .NET apps. Developers can automate AutoCAD file processing in .NET independently without needing additional third-party software installations with the .NET AutoCAD conversion API. It is packed with specific features to manipulate CAD and BIM drawings, access, edit, and search layers, objects, text, and more. Its ability to provide customizable file conversion, support for an array of AutoCAD formats, and cross-platform operability make Aspose.CAD for .NET stand out among other libraries offering similar functionality and feature sets.


1. How can I convert CAD to PDF in .NET?

Converting CAD to PDF in .NET is quick and easy using the AutoCAD API for .NET. Users can convert DWG, DXF, DNG, and more CAD and BIM formats to PDF documents with high fidelity in their .NET apps.

2. How long it takes to process CAD drawings and convert them to PDF or image files?

The AutoCAD API for .NET works fast and completes your AutoCAD file processing and conversion requests in no time.

3. Is it safe to process CAD and BIM files using the .NET API?

You can be sure of the security of your data files while processing them using the AutoCAD processing and conversion API for .NET. We ensure the privacy of your data and take all required measures to provide you with a secure user experience.

4. Can I process AutoCAD files on Mac OS, Windows, or Linux?

Yes, the .NET AutoCAD processing API works across different OS, frameworks, and operating environments. You can use it on the platform of your choice. Our .NET CAD library does not require installing extra software to function.

Looking for help?

Checkout our support channels for help with your questions related to Aspose product API features and working.

Ready to get started?

Download Free Trial View All APIs