This simple topic is about how to convert DWG to TIFF in C# by exposing the required application configurations to use the library and a step-wise process to develop this application. The CadRasterizationOptions class object can be used to customize the output TIFF image according to your requirements. In the example code to export the DWG file to TIFF in C#, we have demonstrated the setting of the page size for the output TIFF file.
Steps to Export DWG to TIFF in C#
- Establish the environment to add Aspose.CAD for .NET from the NuGet package manager to convert DWG to TIFF
- Load the source DWG file using an instance of the Image class
- Instantiate the CadRasterizationOptions class object to set the output TIFF page size
- Instantiate the TiffOptions class object and set the VectorRasterizationOptions property of TiffOptions
- Save the DWG as a TIFF file using the TiffOptions object
The aforementioned steps crisply define the process that can convert DWG file to TIFF in C#, whereby we will start by accessing the source DWG file from the disk using an instance of the Image class, which will then be followed by instantiating a TiffOptions class object as an argument with the default settings. If you intend to customize the rasterization options of the DWG file then you can use CadRasterizationOptions class instance to customize the output TIFF file.
Code to Export DWG to TIFF in C#
This example can be utilized to develop a DWG to TIFF converter software in C# as all the important classes and methods are mentioned in it. The CadRasterizationOptions class object is used to further customize the rasterization process like the page size, however, you can set other properties like draw color, draw type, background color, layers, pen options, layouts, and quality.
This example has focused on the process to convert DWG file to TIFF in C#. If you want to learn about the process to convert SVG to PDF, refer to the article convert SVG to PDF in C#.