Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manipulating EPS/AI files in .NET

I am trying to automate the manipulation of Illustrator (EPS/AI) files. I need to automatically generate EPS files online and send them to a printer.

I have a template AI file into which I want to insert a unique barcode. The AI file is simple enough, it has a gradient background with 3 shapes and 2 lines of text. The barcode is generated automatically and is a PNG.

I have tried ImageMagick, ImageGlue. Although these essentially do what I want they rasterize the illustrator file and the quality of final result is terrible.

I have tried ReaConverter which will not insert the barcode if the output file is AI/EPS, it will do it correctly for other formats.

I have also tried Inkscape. Although it can be used from the command line it displays a dialog box when opening an illustrator file and so can't be run unattended.

I've never worked with Illustrator before so I am lacking experience. And probably missing something obvious.

Has anyone any experience with a similar task.

Is it possible to automate illustrator from .Net? Failing that is there any applications/components (commercial is fine) that I can use. I'm sure that this problem as been solved before.

I've been at this for several days now and may be looking at the problem from the wrong angle.

Thanks for reading and I'd appreciate any help that you can give.

If you need anymore information please let me know.

like image 370
richie Avatar asked Oct 08 '22 21:10

richie


1 Answers

you can automate AI via .NET code by using the exposed COM objects. I did this some years ago and I was able to create graphics and primitives on the AI document, more or less like you do with Excel and Word via Automation.

I remember this is free once you have bought a license of AI, no additional SDKs or libraries required. have a look here:

http://www.adobe.com/devnet/illustrator/sdk.html

and there:

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/illustrator/pdfs/programmers-guide.pdf

like image 79
Davide Piras Avatar answered Oct 13 '22 09:10

Davide Piras