This quick article explains how to convert PLT to PDF in C#. It covers all the important information including the algorithm and code snippet to create a PLT to PDF converter software in C#. Moreover, it also discusses improvising the conversion process based on your requirements.
Steps to Export PLT to PDF in C#
- Prepare the environment by adding Aspose.CAD for .NET using the NuGet package manager plugin to convert PLT to PDF
- Load the source PLT file with the Image class
- Create an object of the PdfOptions class and initialize the CadRasterizationOptions class instance to set the page size
- Set the VectorRasterizationOptions property for specific values
- Export the PLT file to PDF format
The steps above numerate how to convert PLT files to PDF in C#. First of all, the source PLT file is loaded and different options can be set to customize the PLT conversion. Finally, render the PDF document and write it to the disk or stream.
Code to Export PLT to PDF in C#
This sample code converts AutoCAD PLT to PDF in C#. The input PLT file is accessed using the Image class and then the CadRasterizationOptions class is utilized to set the page size of the output PDF document. Finally, invoke any overload of the Save method to render the PDF document. Moreover, you can also set rotation, watermark color, watermark text, and other properties of the PdfOptions class as per your requirements.
This article has covered the details of converting PLT to PDF in C#. However, if you are interested in learning DWG to PDF conversion, read the article on how to convert DWG to PDF in C#.