Convert PSD to PDF using C#
C#.NET Photoshop Manipulation API - Aspose.PSD is a PSD SDK that can replace Adobe Photoshop on a server. Conversion of PSD file to PDF with selectable text can be easily made.
To convert PSD to PDF you can use the following code:
Below provided sample code demonstrates how to convert PSD to PDF:
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
string inputFile = dataDir + "PsdConvertToPdfExample.psd"; | |
using (var psdImage = (PsdImage)Image.Load(inputFile, new PsdLoadOptions())) | |
{ | |
psdImage.Save(dataDir + "PsdConvertedToPdf.pdf", | |
new PdfOptions() { | |
PdfDocumentInfo = new PdfDocumentInfo() | |
{ | |
Author = "Aspose.PSD", | |
Keywords = "Convert,Psd,Pdf,Online,HowTo", | |
Subject = "PSD Conversion to PDF", | |
Title = "Pdf From Psd", | |
}, | |
ResolutionSettings = new ResolutionSetting(5, 6) | |
}); | |
} |
You can specify additional PDF meta information in PdfOptions, like Author, Keywords, Subject, Title. Adobe Photoshop file can be pixel-perfect exported with Read-Only Mode, but in this case, you will not be able to select text from PSD Text Layers.
Batch processing of PSD files to PDF can help you to make a previewer for your website. PDF format can not be edited as a PSD file, so you can use it as an unchangeable format to work with your customers or partners and at the same moment you will have a PSD template that you can change at any time.