Convert PLT to PDF in C#

CAD applications use PLT files for creating 2D or 3D drawings. Specifically, we can create and save designs for construction projects such as highways, bridges, and buildings in a PLT file. In certain cases, we may need to export drawings from PLT files to PDF documents programmatically. Such conversions allow sharing of drawings in a portable format. In this article, we will learn how to convert a PLT file to a PDF in C#.

The following topics shall be covered in this article:

  1. C# PLT to PDF Converter – Free Download
  2. Steps to Convert PLT File to PDF Document
  3. Convert PLT to PDF Programmatically
  4. Export PLT to PDF with Options

C# PLT to PDF Converter – Free Download

To convert a PLT file to a PDF document, we will be using the Aspose.CAD for .NET API. It allows creating, editing, and manipulating PLT files and several other file formats.

The API’s base class for all types of drawings is the Image class.A PLT image is represented by the PltImage class.The CadRasterizationOptions class allows us to modify the [PageWidth] and [PageHeight] properties.PDF options can be specified using the API’s PdfOptions class.

Please either download the DLL of the API or install it using NuGet.

PM> Install-Package Aspose.CAD

How to Convert PLT File to PDF using C#

Using Aspose, we can convert a PLT file to a PDF document with ease.CAD for.NET by following the below-mentioned steps:

  • Load a PLT drawing file.
  • Save PLT as PDF.

Now, let’s see how to perform these steps in C# to convert a PLT file to a PDF document.

Convert PLT to PDF Programmatically in C#

Please follow the steps given below to convert a PLT to a PDF:

  1. Utilizing the Image class, load an input PLT file initially.
  2. Create an instance of the PdfOptions class after that.
  3. Finally, to save it as a PDF, call the Save() method.PdfOptions and the path to the output PDF file are its arguments.

The following code sample shows how to convert a PLT file to a PDF document using C#.

Export PLT to PDF with Options in C#

We can specify PDF save options while converting a PLT file to a PDF document by following the steps given below:

  1. Utilizing the Image class, load an input PLT file initially.
  2. Next, make an instance of the class “CadRasterizationOptions.”
  3. Then, specify the width and height of the page.
  4. Create an instance of the class “PdfOptions” next.
  5. After that, change the value of the property “VectorRasterizationOptions” to “CadRasterizationOptions.”
  6. Finally, to save it as a PDF, call the Save() method.PdfOptions and the path to the output PDF file are its arguments.

The following code sample shows how to specify the page height and width while saving a PLT file as a PDF document using C#.

Get Free Temporary License

You can get a free temporary license to try the library without evaluation limitations.

Conclusion

In this article, we have learned how to:

  • load an existing PLT drawing file;
  • specify page height and width;
  • define save options;
  • save PLT as a PDF in C#.

The PLT file format is a vector-based plotter file introduced by Autodesk, Inc. and contains information for a certain CAD file. Plotting details require accuracy and precision in production, and usage of PLT file guarantee this as all images are printed using lines instead of dots. The format is based on the HPGL file format which is used for sending information to plotter printers. Besides converting a PLT to a PDF in C#, you can learn more about Aspose.CAD for .NET API using the documentation. Please feel free to get in touch with us on our free support forum if you have any questions.

See Also