Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to save as .ai file to .eps format ??

New Here ,
Apr 13, 2009 Apr 13, 2009

Hi all,

Could anyone help me out on the below problem.

I need to write a script which will save a .ai file to .eps file format and store in  to a fixed location. (Ex \\10.99.0.60\epsfile\)..

This action should happen on executing the script.

        Here we don’t need to enter the file name .It will be saved to the same file name. We just have to change the extension of the file and store it to a fixed location.        Ex: when the current file name is ‘test.ai’ the output file name will be ‘test.eps’

Please help me on the abhove issue.

thanks and Regards,

sanat

TOPICS
Scripting
5.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Explorer ,
Apr 16, 2009 Apr 16, 2009

Hi Sanat,

This is actually quite straight forward, check out the saveas method on the active document, and pass it eps options. Please refer to the illustrator javascript reference, and you can also check out the existing SaveDocsAsPDF.js (installed with Illy, I believe) for a similar example (saving as PDF - but the principle is similar).

Good luck!    

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 07, 2009 May 07, 2009

Thanks for the tips frax, could you elaborate a little more. I am new to scripting and as a designer I am no programmer but willing to give it a shot.

For a start I searched for the Javascript you mentioned but Spotlight couldn't find it.

My needs are to go back though a large collection of my old artwork, most are eps, and convert them to pdf compatible Illustrator files so that they can be cataloged with a preview and also be viewable with CoverFlow.

My requirements are:

1. To open all the contents of a folder or set of nested folders

2. Preferably enlarge the window to a fixed size and position (back up to the left corner of the screen)

3. Zoom to fit window

4. Save the file as an Illustrator CS4 file with "Create PDF compatible File" and "Use Compression" checked but with no ICC profile.

5. Save to same location as original file

6. Save without [converted] tag and overwrite the existing file if it has the same name.

7. Batch convert all files in selected directory/directories

8. Skip any errors but logo them

9. Announce a message when completed

I know I am asking a lot but that is basically what I am doing manually at the moment and it is very time consuming and tedious.

Could you please point me in the right direction and give me an idea of what steps I need to take to achieve this?

Thank you very much,

Peter

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2009 May 07, 2009

So what OS are you using.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 07, 2009 May 07, 2009

Mac OSX 10.5.6.

Is there anything else, until Snow Leopard arrives?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2009 May 07, 2009

Try this. Cut and paste into the AppleScript Script Editor Application. Save as whatever name in HD>Applications>Adobe Illustrator CS4>Presets>Scripts folder and restart.

This will open all files of the fileTypes in a folder and resave them as AICS4 files with compression and PDF compatibility. It will do a folder only not a Directory. You'll have to put in your own error handling for bad fonts. It makes all files CMYK and updates legacy text.


-- BEGIN CODE

set fileTypes to {"EPSF", "PDF ", "ART5", "TEXT"} -- file types available to resave as Illustrator

-- get a sourceFolder that holds the files to resave as AI
set sourceFolder to (choose folder with prompt "Choose a folder with files to resave as Illustrator:") as text

-- get a list of files of the defined type in the sourceFolder
tell application "Finder" to set workingFiles to (every file of folder sourceFolder whose file type is in fileTypes) as alias list
-- now you have your fileList argument

-- get a destinationFolder to hold the PDFs
set destinationFolder to choose folder with prompt "Choose a folder to hold the Illustrator files:"

SaveFilesAsIllustrator14(workingFiles, destinationFolder)

on SaveFilesAsIllustrator14(fileList, destinationFolder)
    set destinationPath to destinationFolder as string
    repeat with aFile in fileList
        tell application "Finder"
           
            set fileName to displayed name of aFile -- get displayed name
            set AppleScript's text item delimiters to "."
            set newFileName to text item 1 of fileName
            set newFilePath to destinationPath & newFileName & ".ai"
           
        end tell
        tell application "Adobe Illustrator"
            open aFile forcing CMYK with options {update legacy text:true}
            save current document in file newFilePath as Illustrator with options {class:Illustrator save options, embed linked files:true, PDF compatible:true, font subset threshold:0.0}
            close current document saving no
        end tell
    end repeat
end SaveFilesAsIllustrator14


-- END CODE

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 07, 2009 May 07, 2009
LATEST

Thank you very much for this I'll give this a shot later.

Thanks again Larry,

Peter

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