This article explains how to convert EPS to PDF using C#. It provides information on loading and customizing the input EPS file and also setting parameters of the output PDF file. Detailed steps, IDE settings, and a sample code are given to demonstrate the conversion of EPS to PDF.
Steps to Change EPS to PDF using C#
- Add reference to Aspose.Imaging for .NET to convert EPS to PDF
- Load the source EPS file and cast it as an EpsImage object
- Customize the loaded EPS file, such as resizing, cropping, rotating and adding some graphics or text if required
- Create the PdfOptions class object for output PDF file customization
- Set desired properties like compliance, metadata, resolution, page size, etc., for creating the desired output
- Save the loaded EPS as a PDF using the above options
These steps summarize the process to develop an EPS file to PDF converter using C#. Load the input EPS file into an Image object, typecast it to EpsImage, and optionally customize it by resizing, rotating, cropping, and drawing text or graphics. Next, create the PdfOptions class object to customize the output PDF file and save the image using these settings.
Code to Convert EPS File to PDF using C#
This code has demonstrated the process of transforming an EPS file to PDF using C#. During the customization of the loaded EPS file, its script is not changed, whereas the file is customized in memory only. The output PDF file can be configured by changing the properties like size, margins, resolution, metadata, compression, layout, etc.
This article has taught us the process to develop an EPS to PDF converter software. To convert a WEBP file to a GIF file, refer to the article Convert WEBP to GIF using C#.