This tutorial guides on how to convert CDR to PDF using C#. It has the IDE settings, a list of steps, and a sample code for developing a CDR to PDF converter software using C#. This process is commonly used when sharing, printing, or archiving CorelDRAW artwork in a widely supported, non-editable PDF format.
Steps to Change CDR to PDF using C#
- Set the IDE to use Aspose.Imaging for .NET to transform CDR to PDF
- Define the folder path where the input CorelDRAW i.e. CDR file is located and where the output PDF will be saved
- Open the CDR file as a VectorMultipageImage object that may contain multiple pages
- Loop through all pages in the CDR file and prepare individual rasterization options for each one
- Define the page-specific rasterization settings into a PDF export configuration that supports multiple pages
- Save the vector image to a PDF file using the specified rasterization and export settings
These steps define the process to convert Corel Draw file to PDF using C#. The program determines the file path, loads the multi-page CDR file, and prepares rasterization settings for each page based on its dimensions. It then configures PDF export options using these settings and saves the final output as a multi-page PDF file.
Code to Convert CDR File into PDF using C#
The above code demonstrates the conversion of the CDR file to PDF using C#. You can set specific background color for your pages using the BackgroundColor property. If you wish to convert only certain pages from the CDR file, you can selectively process these pages by specifying their indices.
This article has taught us the conversion of the file format from CDR to PDF using C#. To remove background from an image, refer to the article Remove background from image using C#.