Aspose.CAD 22.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aspose.CAD --version 22.2.0
NuGet\Install-Package Aspose.CAD -Version 22.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.CAD" Version="22.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aspose.CAD --version 22.2.0
#r "nuget: Aspose.CAD, 22.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aspose.CAD as a Cake Addin
#addin nuget:?package=Aspose.CAD&version=22.2.0

// Install Aspose.CAD as a Cake Tool
#tool nuget:?package=Aspose.CAD&version=22.2.0

Fetch DWF Page Size Dimension via CAD .NET API

Version 22.2.0 Nuget

banner

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

Aspose.CAD for .NET is a standalone class library to enhance ASP.NET & Windows applications to process & render CAD drawings without requiring AutoCAD or any other rendering workflow. The CAD Class Library allows high-quality conversion of DWG, DWF, DWFX, DWT, DGN, STL, OBJ, STL, CF2, IGES, IFC, PLT, and DXF files, layouts, and layers to PDF & raster image formats.

What is Aspose.CAD for .NET?

Aspose.CAD for .NET is a cross-platform library that seamlessly integrates; rendering, editing, reporting, and conversion capabilities for AutoCAD, and other CAD & BIM drawings into your own .NET Apps, without the need to install any 3rd party software.

It enables your C#, VB.NET, ASP.NET applications to work with plain plots, 3D solids, wired models, basic cube positions, 3D faces, surfaces, and meshes within DWG, DXF, DWF, and DGN file formats. Other supported formats include IFC, IGES, STL, DWT, PLT, DWFx, CFF2, and OBJ which can be exported to a variety of vector formats, such as; SVG, WMF, PDF as well as raster image formats (BMP, JP2, GIF, PSD, JPEG, TIF, PNG, etc.). You can also convert AutoCAD files to high-quality PDF, other vector formats, or raster images while tracking the file conversion process. Aspose.CAD for .NET also allows developers to select and convert specific layouts and layers.

Aspose.CAD for .NET supports Windows, Linux, Android, and iOS operating systems (32-bit and 64-bit). It could be integrated into your .NET infrastructure with .NET Core, Xamarin, Mono, or via classic .NET Framework.

CAD File Processing Features

  • Convert CAD to PDF.
  • Convert CAD to images.
  • Track file processing progress.
  • Manipulate drawing entities and blocks.
  • Select and convert specific layouts of CAD drawings.
  • Select and convert specific layers of CAD drawings.
  • Adjust CAD drawing size before rendering.
  • Support for BigFont.
  • Automatically detect optimal zoom for the CAD drawings.

What's new in v22.2.0

Fetch Page Size & Page Dimensions of DWF

Added the ability to get the page size & page dimensions of DWF file.

// The path to the documents directory.
string MyDir = RunExamples.GetDataDir_DWFDrawings();
string sourceFilePath = MyDir + "blocks_and_tables.dwf";
string extension = Path.GetExtension(sourceFilePath);
using (DwfImage image = (DwfImage)Aspose.CAD.Image.Load(sourceFilePath))
    {
        foreach (var page in image.Pages)
            {
                var layout = page.Name;
                System.Console.WriteLine("Layout= " + layout);
                using (FileStream fs = new FileStream(MyDir + "layout_" + layout + ".jpg", FileMode.Create))
                {
                    JpegOptions jpegOptions = new JpegOptions();
                    CadRasterizationOptions options = new CadRasterizationOptions();
                    options.Layouts = new string[] { layout };

                    double sizeExtX = page.MaxPoint.X - page.MinPoint.X;
                    double sizeExtY = page.MaxPoint.Y - page.MinPoint.Y;

                    if (page.UnitType == UnitType.Inch)
                    {
                        options.PageHeight = CommonHelper.INtoPixels(sizeExtY, CommonHelper.DPI);
                        options.PageWidth = CommonHelper.INtoPixels(sizeExtX, CommonHelper.DPI);
                    }
                    else if (page.UnitType == UnitType.Millimeter)
                    {
                        options.PageHeight = CommonHelper.MMtoPixels(sizeExtY, CommonHelper.DPI);
                        options.PageWidth = CommonHelper.MMtoPixels(sizeExtX, CommonHelper.DPI);
                    }
                    else
                    {
                        options.PageHeight = (float)sizeExtY;
                        options.PageWidth = (float)sizeExtX;
                    }


                    jpegOptions.VectorRasterizationOptions = options;

                    image.Save(fs, jpegOptions);
                }
            }
    }

Default Fallback Font

Added the facility to set the default fallback font.

DXF to PDF Transparency Effect in MTEXT

It was observed that during DXF to PDF conversion the MTEXT (Multiple Text) was losing transparency. This issue has now been resolved.

The following is a simple C# code snippet that converts a specific layer from DXF format into PDF format via API:

string MyDir = RunExamples.GetDataDir_DXFDrawings();
string sourceFilePath = MyDir + "conic_pyramid.dxf";
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath))
    {
        //  Create an instance of CadRasterizationOptions and set its various properties
        Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
        rasterizationOptions.PageWidth = 1600;
        rasterizationOptions.PageHeight = 1600;

        // Add desired layers
        rasterizationOptions.Layers = new string[] { "LayerA" };
        // Create an instance of PdfOptions
        Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
        
        // Set the VectorRasterizationOptions property
        pdfOptions.VectorRasterizationOptions = rasterizationOptions;

        MyDir = MyDir + "conic_pyramid_layer_out.pdf";
        
        //Export the DXF to PDF
        image.Save(MyDir, pdfOptions);                
    }

For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.CAD for .NET 22.2 - Release Notes.

Supported Read CAD Formats

AutoCAD®: DWG, DGN, DWT, DWF, DWFx
Plotter Configuration: PC3
Data Model: IFC
CAD Data Exchange: IGES
3D Printing: STL
Vector Based Plotter: PLT
3D Package Design CFF2
3D Geometry: OBJ

Supported Read & Write CAD Formats

AutoCAD®: DXF (Write feature is partially supported)

Save CAD As

Fixed Layout: PDF
Raster Image: TIFF, JPEG, PNG, GIF, BMP

Platform Independence

Aspose.CAD for .NET supports .NET framework (ASP.NET applications & Windows applications) as well as .NET Core. It supports any 32-bit or 64-bit operating system where .NET or Mono framework is installed, this includes but is not limited to, Microsoft Windows desktop (XP, Vista, 7, 8, 10), Microsoft Windows Server (2003, 2008, 2012), Microsoft Azure, Linux (Ubuntu, OpenSUSE, CentOS, and others), and Mac OS X.

Get Started

Are you ready to give Aspose.CAD for .NET a try? Simply execute Install-Package Aspose.CAD from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.CAD for .NET and want to upgrade the version, please execute Update-Package Aspose.CAD to get the latest version.

Add Watermark to CAD using C# Code

You can execute the below code snippet to see how the API performs in your environment or check the GitHub Repository for other common usage scenarios.

CadText text = new CadText();
text.DefaultValue = "Watermark text";
text.TextHeight = 40;
text.FirstAlignment = new Cad3DPoint(300, 40);

Export DXF to PDF using C# Code

var rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.PageWidth = 500;
rasterizationOptions.PageHeight = 500;

rasterizationOptions.Layouts = new string[] {
  "Model"
};
var pdfOptions = new PdfOptions();
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
cadImage.Save(dir + "output.pdf", pdfOptions);

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net20 is compatible.  net35 is compatible.  net35-client is compatible.  net40 is compatible.  net40-client is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid10 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed.  monotouch10 is compatible. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed.  xamarinmac20 is compatible. 
Xamarin.TVOS xamarintvos was computed.  xamarintvos10 is compatible. 
Xamarin.WatchOS xamarinwatchos was computed.  xamarinwatchos10 is compatible. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aspose.CAD:

Package Downloads
Aspose.Total

Aspose.Total for .NET is the most complete package of all .NET file format APIs offered by Aspose. It empowers developers to create, edit, render, print and convert between a wide range of popular document formats within any .NET, C#, ASP.NET and VB.NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
24.1.0 2,598 2/12/2024
23.12.0 5,001 1/2/2024
23.11.0 3,631 12/17/2023
23.10.0 9,932 11/13/2023
23.9.0 18,318 10/2/2023
23.8.0 27,163 8/22/2023
23.7.0 40,837 7/20/2023
23.6.0 47,768 6/22/2023
23.5.0 47,021 5/24/2023
23.4.0 45,892 4/26/2023
23.3.0 62,806 3/26/2023
23.2.0 59,744 2/25/2023
23.1.0 21,711 1/26/2023
22.12.0 13,315 1/3/2023
22.11.0 38,316 11/27/2022
22.10.0 10,617 11/7/2022
22.9.0 29,599 10/4/2022
22.8.0 8,818 9/4/2022
22.7.0 66,370 7/17/2022
22.6.0 46,035 6/12/2022
22.5.0 30,264 5/19/2022
22.4.0 12,543 5/4/2022
22.3.0 8,485 4/23/2022
22.2.0 34,474 3/2/2022
22.1.0 8,544 2/5/2022
21.12.0 32,574 12/24/2021
21.11.0 15,012 11/22/2021
21.10.0 10,295 10/24/2021
21.9.0 20,198 9/9/2021
21.8.0 3,025 9/1/2021
21.7.0 40,848 8/4/2021
21.6.0 8,572 7/13/2021
21.5.0 18,696 5/31/2021
21.4.0 44,906 5/10/2021
21.3.0 19,524 4/11/2021
21.2.0 9,998 3/16/2021
21.1.0 14,031 2/9/2021
20.12.0 5,458 1/16/2021
20.11.0 9,567 12/10/2020
20.10.0 14,654 11/9/2020
20.9.1 15,351 10/5/2020
20.8.1 3,242 9/12/2020
20.7.0 7,728 8/6/2020
20.6.0 4,279 6/27/2020
20.4.0 18,910 5/8/2020
20.3.0 5,746 3/31/2020
20.1.0 10,898 1/25/2020
19.9.0 16,954 10/7/2019
19.7.0 36,063 8/10/2019
19.5.0 2,737 5/19/2019
19.2.0 2,095 3/14/2019
18.12.0 4,542 1/9/2019
18.8.1 2,024 11/28/2018
18.8.0 2,984 9/3/2018
18.3.0 6,049 3/9/2018
17.12.0 2,131 12/21/2017
17.9.0 3,978 9/23/2017
17.4.0 3,102 4/28/2017
17.2.0 2,527 2/20/2017
16.12.1 1,745 12/29/2016
16.12.0 1,539 12/16/2016
16.10.0 1,789 10/19/2016
1.1.0 2,063 8/3/2016
1.0.0 2,358 5/24/2016