Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active January 9, 2022 08:40
C# AI to Images, PSD and PDF Conversion | Aspose.PSD for .NET

Convert AI to Images, PSD and PDF using .NET Photoshop API

C# codes listed below demonstrating how to convert AI to PNG, GIF, JPEG, BMP, TIFF Images, Photoshop PSD, PSB and PDF. Developers can easily use and modify these as of their AI conversion application requirement.

More details of differnt conversion cases using .NET Photoshop Library at https://products.aspose.com/psd/net/conversion/

Here is the list of all supported formats https://docs.aspose.com/psd/net/supported-file-formats/

For code integration there few prerequisite listed in installation section below.

Installation

Install from command line as nuget install Aspose.PSD or via Package Manager Console of Visual Studio with Install-Package Aspose.PSD.

Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads.

More About .NET PSD API

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.bmp", new BmpOptions());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.gif", new GifOptions());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.jpeg", new JpegOptions());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.jp2", new Jpeg2000Options());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.pdf", new PdfOptions());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.png", new PngOptions());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
var options = new PsdOptions() { PsdVersion = PsdVersion.Psb};
image.Save("output.psb", options);
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.psd", new PsdOptions());
}
using (var image = (AiImage)Image.Load("template.ai"))
{
image.Save("output.tiff", new TiffOptions());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment