Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create basic Adobe Illustrator files programmatically?

I need to create a really basic Adobe Illustrator file on the clipboard that I can paste in Adobe Illustrator or Expression Design. I'm looking for code samples on how to programmatically generate Adobe Illustrator Files, preferably from C# or some other .NET language (but at the moment any language goes).

I have found the Adobe Illustrator 3 File Format documentation online but it's allot to digest for this simple scenario.

I don't want to depend on the actual Adobe Illustrator program (COM interop for instance) to generate my documents. Must be pure code.

The code is for an Expression Studio addin, and I need to be able to create something on the clipboard I can paste into Expression Design. After looking at the formats Expression Design puts on the clipboard when copying a basic shape I've concluded that ADOBE AI3 i the best one to use (the others are either rendered images, or cfXaml that you cannot paste INTO Design).

So based on this I can't use SWG which would probably been easier.

Another idea might be to use a PDF component as the AI and PDF format is supposed to be compatible? I'm also finding some references to a format called "Adobe Illustrator Clipboard Format" (AICB), but can't find allot of documentation about it.

like image 226
Jonas Follesø Avatar asked Sep 22 '08 04:09

Jonas Follesø


People also ask

What program creates AI files?

AI is a graphics file format created by Adobe systems. It is short for Adobe Illustrator Artwork file. AI files are vector based graphics contained in a single page.

How can I create AI file without Illustrator?

Inkscape is the best free alternative to Adobe Illustrator. Inkscape is a free vector graphics editor. You can use Inkscape to open and edit AI files.

What is a Pathed AI file?

What is a AI File? AI file extension represents Adobe Illustrator Artwork file. This graphics file format is a creation of Adobe systems for containing vector based graphics in a single page. Instead of using bitmap image data, this format is composed of paths connected by points.


2 Answers

I know that Inkscape is free and open source and can edit .ai files.

This might be a place to start. http://www.inkscape.org/

Also, I think Illustrator can handle standard svg files, so maybe generating those would be a lot easier. (They are XML based) http://www.w3.org/Graphics/SVG/

like image 80
user16773 Avatar answered Sep 16 '22 15:09

user16773


Try using ExtendScript, a javascript-like scripting environment provided by Adobe (an ExtendScript editor is included with CS), which allows you to manipulate various Adobe apps with scripts. I've been able to create, manipulate, and save Photoshop files with ES, so I'm sure you could do it with AI as well.

like image 25
wpjmurray Avatar answered Sep 16 '22 15:09

wpjmurray