How to Convert PSD to PDF in C#

In this step-by-step topic, you’ll have a chance to learn how to convert PSD to PDF in C#. The developed application can be utilized easily to save PSD as PDF using C# and can be used in any of the .NET configured environments inside Windows,macOS, or Linux.

Steps to Convert PSD to PDF in C#

  1. Establish your environment by installing Aspose.PSD for .NET from NuGet
  2. Load the source PSD file from the disk using an instance of the PsdImage class
  3. Use an instance of the PdfDocumentInfo class to set PDF metadata
  4. Use the PdfOptions options class to set the desired PDF properties
  5. Save the converted PDF file on the disk

By using C# PSD to PDF conversion application can be easily developed using the above-mentioned steps, whereby the process will commence by accessing the source PSD file from the disk. Then by using an instance of the PdfDocumentInfo and PdfOptions classes, the desired PDF metadata information along with other properties will be set. Finally, the loaded PSD will be exported as a PDF file on the disk using the save method.

Code to Export PSD to PDF in C#

In the above-mentioned example, the process of exporting a PSD to PDF using C# is exhibited whereby the Image.Load() method is utilized to load the source PSD file from the disk. The PdfDocumentInfo and PDFOptions classes are used to set the metadata information like author, keywords, subject, title, etc. The PdfOptions class is used to set the output PDF options including the setting of resolution for the output document.

The topic has explained to us the process of converting PSD to PDF using C# using a step-wise approach. If you are interested in learning about converting a PSD to JPEG, refer to the article on how to convert PSD to JPEG in C#.

 English