In this elaborative example, you’ll learn how to convert AI to PDF in C# by using the precisely defined steps to use the example code. The application is very lucid and can be used to save AI as PDF using C# in any .NET configured environment in Windows, Linux, or macOS.
Steps to Export AI to PDF in C#
- Establish your environment by installing Aspose.PSD for .NET from NuGet to convert AI to PDF
- Load the sample Adobe Illustrator (AI) file from the disk using an instance of the AiImage class
- Create an instance of the PdfOptions class object to set the desired PDF properties
- Save the AI file as a PDF file on the disk
Using C# Adobe Illustrator to PDF file conversion applications can be developed using the aforementioned stepwise procedure, where the process will initiate by loading the source Adobe Illustrator file from the disk. Then by using an instance of the PdfOptions class, the requried properties for the desired PDF file will be set. Finally, the loaded Adobe Illustrator (AI) file will be saved as a PDF file on the disk using the Image.Save method.
Code to Export AI to PDF in C#
In the aforementioned example, the process of converting Adobe Illustrator to PDF using C# is exhibited whereby the Image.Load() method is referred to access the source AI file from the disk. The PdfOptions class instance is utilized to set the properties like MultiPageOptions, ResolutionSettings, and VectorRasterizationOptions to name a few. Once, the required PDF properties will be set, the output PDF file will be saved on the disk.
This topic has taught us about the process of converting AI to PDF using C# in a well-defined manner. If you are interested in learning about converting an Adobe Illustrator to a JPEG file, refer to the article on how to Convert AI to JPEG in C#.