How to convert and view AI files
Introduction
AI is an Adobe vector graphics format. Typically used for logos and print media, illustrations.
How to view AI files
The AI files can be opened with Adobe Illustrator and Corel Draw.
In case you need to view an AI file in a browser or a standard image or PDF viewer application, you can convert it to HTML, JPEG, PNG PDF format with GroupDocs.Viewer for .NET.
Convert AI to HTML
To convert AI files to HTML with GroupDocs.Viewer for .NET use following code:
using (Viewer viewer = new Viewer("sample.ai"))
{
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("ai_result.html");
viewer.View(options);
}
The following screenshot shows the output HTML file opened in a browser.
Convert AI to JPG
To convert AI files to JPG with GroupDocs.Viewer for .NET use following code:
using (Viewer viewer = new Viewer("sample.ai"))
{
JpgViewOptions options = new JpgViewOptions("ai_result.jpg");
viewer.View(options);
}
The following screenshot shows the output JPG file opened in a Windows Photo Viewer application.
Convert AI to PNG
To convert AI/HPG files to PNG with GroupDocs.Viewer for .NET use following code:
using (Viewer viewer = new Viewer("sample.ai"))
{
PngViewOptions options = new PngViewOptions("ai_result.png");
viewer.View(options);
}
The following screenshot shows the output PNG file opened in a Windows Photo Viewer application.
Convert AI to PDF
To convert AI files to PDF with GroupDocs.Viewer for .NET use following code:
using (Viewer viewer = new Viewer("sample.ai"))
{
PdfViewOptions options = new PdfViewOptions("ai_result.pdf");
viewer.View(options);
}
The following screenshot shows the output PDF file opened in a browser.
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
- GroupDocs.Viewer for .NET examples, plugins, and showcase
- GroupDocs.Viewer for Java examples, plugins, and showcase
- Document Viewer for .NET MVC UI Example
- Document Viewer for .NET App WebForms UI Modern Example
- Document Viewer for Java App Dropwizard UI Modern Example
- Document Viewer for Java Spring UI Example
Free Online App
Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.