Hi All,
I want to convert a AI file into a JPEG by using JSX(java script)
i am able to change its file type but having some problem with resizing
can anyone please suggest me some solution.
Thanks
Thanks Mark
But i want to change the size of input AI while converting it to JPEG
this is all i want to do.
i am using the following code:
var docRef = app.activeDocument;
var srcFile = app.activeDocument.fullName;
var dstFile = app.activeDocument.path+"/"+app.activeDocument.name;
//var dstFile = "D:/"+app.activeDocument.name;
var ej = new ExportOptionsJPEG();
ej.Optimization = true;
ej.QualitySetting = 60;
ej.blurAmount=0;
for(var i=0; i<docRef.rasterItems.length;i++)
{
docRef.rasterItems[0].height=110;
docRef.rasterItems[0].width=110;
}
docRef.exportFile(new File (dstFile), ExportType.JPEG, ej);
but i am not sure this will work in every condition.
i need a perfect solution for it because some AI files mightnot have RasterItems in it, that will create a problem while resizing the document.
Please guid me.
Thanx
North America
Europe, Middle East and Africa
Asia Pacific