Highlighted

Re-Saving .ai files without pdf compatibiliy - Script/Droplet

New Here ,
May 22, 2020

Copy link to clipboard

Copied

Hi,

We create illustrator files with many linked images. Our designers frequently save the files with pdf compatibility selected which creates enormous file sizes. Is there a simple script or solution we can look into and run on the files we've already saved to our server? Looking for something more automated than manually selecting files and re-saving without pdf compatibility. Possibly a drag and drop solution.

TOPICS
Performance, Scripting, Sync and storage

Views

259

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Re-Saving .ai files without pdf compatibiliy - Script/Droplet

New Here ,
May 22, 2020

Copy link to clipboard

Copied

Hi,

We create illustrator files with many linked images. Our designers frequently save the files with pdf compatibility selected which creates enormous file sizes. Is there a simple script or solution we can look into and run on the files we've already saved to our server? Looking for something more automated than manually selecting files and re-saving without pdf compatibility. Possibly a drag and drop solution.

TOPICS
Performance, Scripting, Sync and storage

Views

260

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 22, 2020 0
Adobe Community Professional ,
May 22, 2020

Copy link to clipboard

Copied

Hi Paul,

 

Try the following code, it will open a window to select the folder that has your ai files and then resave it with a new name with _out appened at the end in the same folder.

var sourceFolder = Folder.selectDialog();
if(sourceFolder)
{
	filesToProcess = sourceFolder.getFiles("*.ai")
	if(filesToProcess != "")
	{
		for(var i = 0; i < filesToProcess.length; i++)
		{
			var doc = app.open(filesToProcess[i]);
			var mySaveOptions = new IllustratorSaveOptions();
			mySaveOptions.pdfCompatible = false;
			
			//save witn new name
			doc.saveAs(File(filesToProcess[i].fsName.replace(/.ai/i, "_out.ai")), mySaveOptions);
			doc.close(SaveOptions.DONOTSAVECHANGES);
		}
	}
}

 

-Manan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 22, 2020 2
Resources