We have a requirement to programatically convert AI files to JPEG files. (But not as a plug-in). Can this be done using the Adobe AI SDK? If so, could any one provide any pointers on how to do it? If not, what other ways are available for programatically converting AI to JPEG? Are there any other 3rd party SDK which can do this?
mirandamtt, Oct 16, 2012 7:02 AM
I ended up doing this by using the ImageMagick APIs. It does most of the things what we want. However, if the AI file has multiple layers, it does not extract the different layers. Other than that, it pretty solid and reliable.
What I have found that works best and I am currently still looking for something easier by the way. But what I do is I open the Adobe Illustrator file, select all, copy everything, then open a new clipboard file in adobe Photoshop and paste it in there then I save m as a jpeg format. So far that has worked but it is still time consuming. So if all else fails you can try this it works for me.
What language are you planning on writing the stand-alone application in? If you save the illustrator file with PDF compatability(on by default), any of the several PDF libraries should be able to rasterize the file as a generic image, which you can then convert to whichever format you desire.
Some of our customer AI files are NOT saved with PDF compatability. And even if they are, the other PDF libraries do not see the contents outside the AI artboard. I have tried ImageMagick/Ghostscript and other PDF conversion utilities as a possible solution and it does not work:(
As for the programming language, I'm ok with c# .Net / Visual Basic.
Exactly, same problem, I got here, May be this discussion is older but useful for others.
I am using here ImageMagick and Ghostscript in command line with programming. I am able to convert AI file format to JPEG. But got error in some of AI files which has Post Script as format PS,Some of AI files with format PS/PDF are converted with no error, but some particular AI files are not.
I got this error while using Ghostscript,
Error: /undefined in Adobe_level2_AI5
I tried lots of option but always got this error for particular type of AI files.