Skip to content

Instantly share code, notes, and snippets.

@conholdate-gists
Created October 10, 2023 22:01
Show Gist options
  • Save conholdate-gists/b84c7d28237dca4852fc081d6f3d90fa to your computer and use it in GitHub Desktop.
Save conholdate-gists/b84c7d28237dca4852fc081d6f3d90fa to your computer and use it in GitHub Desktop.
Convert AI to PDF | Adobe Illustrator File to PDF Document in C#
// Load the source AI File
Aspose.PSD.FileFormats.Ai.AiImage image = (Aspose.PSD.FileFormats.Ai.AiImage)Aspose.PSD.Image.Load("sample.ai");
// Create PdfOptions class object
Aspose.PSD.ImageOptions.PdfOptions options = new Aspose.PSD.ImageOptions.PdfOptions();
// Set different PDF properties
options.PdfDocumentInfo.Title = "Title";
options.PageSize = new Aspose.PSD.SizeF(500, 500);
// Convert AI to PDF Document
image.Save("output.pdf", options);
// Load the source AI File
Aspose.PSD.FileFormats.Ai.AiImage image = (Aspose.PSD.FileFormats.Ai.AiImage)Aspose.PSD.Image.Load("sample.ai");
// Convert AI to PDF Document
image.Save("output.pdf", new Aspose.PSD.ImageOptions.PdfOptions());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment