How to create basic Adobe Illustrator files programmatically?
Asked Answered
T

3

6

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.

Terminator answered 22/9, 2008 at 4:0 Comment(1)
How did you go with this?Nari
O
6

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/

Orthopedist answered 22/9, 2008 at 4:11 Comment(1)
Thanks for the input guys. But I'm trying to create something on the clipboard I can paste in Expression Design, and it doesn't support SVG or cfXaml. So Adobe AI3 is the format it supports... Thanks for the tip on inkspace.Hypertensive
S
2

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.

Syndicate answered 6/5, 2010 at 14:15 Comment(0)
S
0

SVG is probably the way to go.

Shulins answered 22/9, 2008 at 4:13 Comment(1)
Thanks for the input guys. But I'm trying to create something on the clipboard I can paste in Expression Design, and it doesn't support SVG or cfXaml. So Adobe AI3 is the format it supports...Hypertensive

© 2022 - 2024 — McMap. All rights reserved.