Batch updating .ai files to be PDF compatible.

Hello,
We have a huge library of technical drawings in Illustrator that we have been progressively building for many years. Many of these files are from very old versions of Illustrator (7) up to and including files from CS4. Some are saved as .ai, others as .eps.
What we would like to do in the interests of facilitating accessibility to this data, is to resave all these files as CS3 .ai files with PDF compatibility. I have found an AppleScript here: http://www.justskins.com/forums/how-do-i-remove-pdf-compatability-on-multiple-files-32987. html that I have been able to modify to add PDF compatibility rather than remove it, but this script will only work on one folder at a time (our files are organised in a hierarchy 5 or more levels deep) and seems to be quite fault intolerant (falls over on files with no extension).
We would like to maintain the carefully organised hierarchy of our library, so ideally I need to make a script that will drill down into the folders of our library, opening files as it finds them and then overwriting them with PDF compatible files.
Is this something that is even possible with a script?
Thanks in advance for any light you can shed on this issue…

here you go:
if (!Array.prototype.forEach)
  Array.prototype.forEach = function(fun /*, thisp*/)
    var len = this.length >>> 0;
    if (typeof fun != "function")
      throw new TypeError();
    var thisp = arguments[1];
    for (var i = 0; i < len; i++)
      if (i in this)
        fun.call(thisp, this[i], i, this);
//should we overwrite our files? i strongly recommend that you DON'T or if you do, have a backup
var OVERWRITE = false;
function main() {
    var initDir = Folder.selectDialog();
    if(initDir == null) return;
    var dlg = prompt("Would you like to overwrite existing?(Strongly suggested that you don't)", "NO", "Overwrite?");
    if(dlg == null) return;
    else if(dlg.toLowerCase() == "yes") {
        var cdlg = confirm("Are you really sure that you want to overwrite all files?");
        if(cdlg) OVERWRITE = true;
    recurseDirs(initDir);
function recurseDirs(dir){
    var files = dir.getFiles(isFile);
    var dirs = dir.getFiles(isDir);
    if(files.length>0) recurseFiles(files);
    if(dirs.length>0) dirs.forEach(recurseDirs);
function recurseFiles(files){
    for(j = files.length - 1; j>=0; j--) {
                if(files[j].hidden || files[j].name.substring(0,1) == '.') continue;
                var _doc = app.open(files[j]);
                var name = '', ext = '';
                if(files[j].name.indexOf(".ai") > -1) {
                    name = files[j].name.substring(0, files[j].name.indexOf(".ai"));
                    ext = ".ai";
                } else if(files[j].name.indexOf(".eps") > -1) {
                    name = files[j].name.substring(0, files[j].name.indexOf(".eps"));
                    ext = ".eps";
                } else {
                    name = files[j].name;
                    ext = '';
                var path = '';
                if(!OVERWRITE) {
                    path = files[j].path + "/" + name + "_CS3" + ext;
                } else {
                    path = files[j];
                exportFileToAI(path);
                _doc.close(SaveOptions.DONOTSAVECHANGES);
                //app.redraw();
function isDir(fileObj) {
    if(fileObj instanceof File) return false;
    else if(fileObj instanceof Folder) return true;
    return false;
function isFile(fileObj) {
    if(fileObj instanceof File) return true;
    else if(fileObj instanceof Folder) return false;
    return false;
function exportFileToAI (dest) {
    if ( app.documents.length > 0 ) {
        var saveOptions = new IllustratorSaveOptions();
        var ai13Doc = (dest instanceof File) ? dest : new File(dest);
        saveOptions.pdfCompatible = true;
        saveOptions.compatibility = Compatibility.ILLUSTRATOR13;
        saveOptions.flattenOutput = OutputFlattening.PRESERVEAPPEARANCE;
        app.activeDocument.saveAs( ai13Doc, saveOptions );
main();
hope it helps;
cheers;
*later edit* i think you can also use this for taking the script to other platforms as well. add the function to the script:
function isValidFile(file) {
    var os = (file.creator == "????") 'win' : 'unix';
    if(os == 'win') {
        if(file.name.indexOf(".ai") > -1 || file.name.indexOf(".eps") > -1) return true;
    } else if( os == 'unix') {
        if(file.creator.substring(0,3) == 'ART') return true;
    return false;
... and replace this line:
if(files[j].hidden || files[j].name.substring(0,1) == '.') continue;
with
if(!isValidFile(files[j])) continue;
whatever suits your needs.

Similar Messages

  • Save AI files with Create PDF Compatible file turned on

    I have a bulk of AI files that were saved without PDF compatibility turned on and they don't preview properly in my DAM system. I've tried creating a Save As action but it doesn't work. Does anyone know of a script that will do a Save As with PDF compatibility checked on and overwrite the existing file?

    jscottCMD wrote:  script that will do a Save As with PDF compatibility checked on and overwrite the existing file?
    What you want is "pdfCompatible":
    Javascript Scripting Reference PDF (around pages 80 to 85 depending on the version #)
    IllustratorSaveOptions
    IllustratorSaveOptions properties
    pdfCompatible boolean If true, the file is saved as a PDF compatible file. Default: true
    You can find various scripts to do what you want around the forum, here are a few examples:
    https://forums.adobe.com/thread/1224874?tstart=0
    https://forums.adobe.com/message/3138057
    I trust something will help your efforts.

  • "create pdf compatible file" gets tuned off when running batch

    I created an action that resizes an image and the saves it in the same format (AI) and then close the file. Next I open the AI formatted file I just created in PhotoShop it opens and looks great. So I go back to Illustrator and run the same action in a batch where I open a folder containing AI files run the action and save the files in a different folder. Now I try to open the files in PhotoShop and find out that the batch function some how turned off create pdf compatible file option when it got to save as in the action so now Im unable to open the file in PhotoShop. Im new to illustrator Im using cs4. Thank you for reading do you have any ideas?

    Thanks to all, I really appreciate all the pains which all of you have taken in resolving my problem.
    It wasn't Java problem, rather batch file problem. I was only changing the directory, and was not providing for the exe file to run.
    @echo off
    cd  "C:\JBoss\jboss-4.0.5.GA\bin\Fastran"
    "C:\JBoss\jboss-4.0.5.GA\bin\Fastran\FASTRAN.EXE"
    ren FTN04 FTN04i
    EXIT
    :finishNow it is working fine.
    I did check the access permissions, no problem with that I guess. The problem was with the path. The batch file couldnt go pass bin directory, and I noticed that only today ;(. At any rate, I changed that and now it is all smooth and dandy.
    Once again, thanks a lot.

  • How to open .pdf in Illustrator, and not the pdf compatible half of file.

    We first get a digital proof form printers as .pdf. Sometiems they save them with PDF compatible on. This makes my job harder because will get ilustrator asking for all the links when opening the .pdf.
    What we do is open the .pdf form the printere, adn paste this on topof our orignal .ai file. Thi sis to proof what theyt changed. Adding in theri product numbers, adn updating the UPCS is about all we want to see. What we look for is shifting type, or missing elelements.
    Mas OS 10.8.4, AI CS5

    Sorry for posting figured this out.

  • Batching SaveAs in CS6 will not save PDF Compatible

    So I'm using a script that I wrote to bring in files that were converted from CorelDraw to EPS (this is the best conversion process to preserve text and drawing assets).  Basically the script takes the art in the EPS, groups it, places a rectangular border around the art and centers them.  We do this so that they come into InDesign correctly sized.  The problem is, it used to be 100% automated, just about, however now the saveas action command will not remember that "Save as PDF Compatible" needs to be set to true.  When I do a saveas command, it's check by default, but when the saveas command is batched, it does NOT do it that way.  When I try to bring batched AIs into InDesign, it's text that says it was not saved as PDF Compatible.  Am I going to have to script a save function to get control of the saveas settings?  I don't understand why PDF compatible is checked by default, yet batching saveas saves as if it unchecked it.  Any help would be much appreciated as this is throwing a wrench in my automation.

    I know that I can handle the saveas via script and avoid this issue, however I'd prefer let the action portion handle the saveas.  You understand what I'm saying though, right?  The record action button apparently isn't logging the checked box for PDF compatible, though when you click saveas so the record records your action, the dialog shows it as pdf compatible.  In the batch function, if I say override save functions, it works perfectly, but I have to click yes or no on a dialog every single drawing it goes through.  So are you saying I just need to script it because the actions setup is bugged?

  • Save as does not Create PDF Compatible File even when the creare pdf compatible files is on, Illustrator CC 2014

    save as does not Create PDF Compatible File even when the creare pdf compatible files is on, Illustrator CC 2014

    When I open is adobe acrobat I get this message.
    "This is an Adobe® Illustrator® File that was
    saved without PDF Content.
    To Place or open this  le in other
    applications, it should be re-saved from
    Adobe Illustrator with the "Create PDF
    Compatible File" option turned on. This
    option is in the Illustrator Native Format
    Options dialog box, which appears when
    saving an Adobe Illustrator  le using the
    Save As command."

  • Why does Bridge Need Illustrator to Save as PDF compatible file?

    1. Why does Bridge need Illustrator files to be saved as PDF files? "PDF Compatible File" ticked in the save menu.
    2. Why does saving with this info take so long, even on decent fast modern systems?
    3. Why does Bridge not consistently render the Illustrator files in FULL RESOLUTIONS, seemingly shooting for half resolution much of the time, and simply stopping at that?
    4. Why does "clicking" on the preview inside Bridge bring up the full resolution?
    5. How do I shortcut this process so that every file is previewed in Full RESOLUTION, instantly?
    What is the point of Bridge?  What's its reason for existence?
    First time user of Bridge.

    Since someone is bound to say that this should be asked in the Bridge section... it already is.  And has been referenced back over here.
    You can find it here:
    http://forums.adobe.com/message/5655632#5655632
    Answer wherever you see fit, if you're up to the task of dealing with someone attempting to have a broader view, perhaps also suffering from somewhat objective analysis that sometimes contains direct criticism of the way Adobe does things.

  • Uncheck "Create PDF Compatible File" and "Use Compression" as my default save preference?

    We have discovered that unchecking the "Create PDF compatible file" generates much smaller .ai files when saved.  Since we do not need them to be PDF compatible we want to save them this way every time.  But right now every time we go to save a file the box comes up pre-checked!  We have to uncheck it every time!  Surely there is a preference setting somewhere that we can change so that the default is for these boxes to come up unchecked?
    I have looked under preferences and do not see it.
    Thanks
    The Print Craftsman.

    Which version of Illustrator are you using?
    Usually those settings could be changed by modifying the AIPrefs file.

  • Changing the pdf profile of batch create multiple files in Acrobat?

    Is it possible to load another pdf profile for batch create multiple files from Acrobat? I am batching indesign pages and I need to use a high resolution pdf profile with printer marks
    The default seems to be low res rgb. Any idea if this can be done?

    it is a custom Pdf Profile but basically an X1a with a few tweeks, When I try a watch folder with distiller it just errors out all the files.
    Batch Processing using the "Create PDF, Batch Create Multiple Files " in Acrobat works but does not let me choose a pdf profile.
    C

  • Version 8.1 Can't Activate, Can't Update, Can't create/export NX *.prt Files to 3D PDF. Screen Capture feature does not properly represent Model/Bodies. Printing from NX does not recognize Adobe Acrobat 3D as a printer to try and export.

    Version 8.1 Can't Activate, Can't Update, Can't create/export NX *.prt Files to 3D PDF. Screen Capture feature does not properly represent Model/Bodies. Printing from NX does not recognize Adobe Acrobat 3D as a printer to try and export.
    I was able to register it though.

    Not a surprise. The Acrobat 8 product family passed into End of Support back in 2011.
    Be well...

  • How to batch convert Word files to pdf

    How do I batch convert Word files to pdf using Automator

    Here is a drag/drop AppleScript solution that uses the command-line LibreOffice capability to convert MS Word (.doc, .docx) files into PDF. Drag/Drop a single file, or a folder of Word documents, and it will write the respective PDF back to the original file location. When it is done, an OS X Notification will slide out onto the Desktop and provide the count of processed files.
    Save this AppleScript as a Desktop application that remains open after running. If you ignore the latter, the notification will not show when it is done. Tested on Mavericks 10.9.5.
    property name_extension : {"doc", "docx"}
    global fileCnt
    on open of finderObjects
        set fileCnt to 0
        repeat with i in (finderObjects)
        if folder of (info for i) is true then
            tell application "Finder" to set temp to (entire contents of i)
            repeat with j in (temp)
                process_files(j)
            end repeat
        else
              process_files(i)
        end if
        end repeat
        display notification "Processed Files: " & fileCnt with title "Word2PDF" subtitle "Processing Complete"
    end open
    on process_files(fname)
         set cmd to "/Applications/LibreOffice.app/Contents/MacOS/soffice "
         set cmdArgs to "--headless --convert-to pdf:writer_pdf_Export --outdir "
         tell application "Finder"
              set nameExt to name extension of fname
              set outDir to do shell script "dirname " & POSIX path of (fname as alias)
              if name extension of fname is in name_extension then
                   try
                        do shell script cmd & cmdArgs & outDir & space & POSIX path of (fname as alias)
                        set fileCnt to fileCnt + 1
                   on error errorMessage number errorNumber
                        display alert "Processing Error: " message "[ " & errorNumber & " ] " & errorMessage
                        error number -128
                   end try
              end if
         end tell
         return
    end process_files

  • Erazer X700 new BIOS update flash is failing with 4 - Error: Rom file ROMID is not compatible

    I am trying to apply the new Erazer X700 bios update from http://support.lenovo.com/us/en/products/desktops-and-all-in-ones/lenovo-erazer-x-series-desktops/le...
    It fails when I run it in the admin cmd window, with message 4 - Error: ROM file ROMID is not compatible with existing BIOS ROMID. Any idea why I'm getting this failure?
    Has anyone successfully applied the lastest X700 downloads?

    I am also having this same exact issue. Any help would be greatly appreciated Lenovo.

  • Batch convert file to OCR PDF

    Hi
    we want to survey a software that offer these function:
    1. Batch convert file( MS office / PDF / JPG / TIFF ) to OCR PDF automatically.
    2. Multi-threaded conversions functionality.
    2. Support API .
    Is Adobe Acrobat XI Pro can work?

    No, Acrobat would not be suitable for this purpose.
    Also, be aware that the idea of converting a “born digital” document (such as an MSOffice file) to an “OCR PDF” makes no sense.

  • Create PDF Compatible File Revisited AGAIN for PC

    Hi all,
    I know my way around a Mac, but I would like to help a PC buddy of mine out, too to achieve the same thing—that is, changing the code in the Illustrator preferences file so that every time you save you don't automatically save a PDF compatible file.
    Can anyone help me find my way through the directories for the Preferences file on a PC?
    Thanks
    Re: Create PDF Compatible File Revisited
    Sorry,  I was thinking of the New Document Profiles. Try  Users>(yourname)>Library>Preferences>Adobe Illustrator CS4  Settings.

    see this thread http://forums.adobe.com/thread/655678?tstart=0 (number 6)

  • Turn off "Create PDF Compatible File"?

    Is there a way to turn off the "Create PDF Compatible File" option by default in Illustrator CS4?
    Thanks.

    Though you can mess with the preferences this way and it may work for you there is always a possibility of offering a corruption or the invitation to a corruption that has not been tested for this way.So you should keep a clean copy of the AI preferences in case you have a problem doing something with ai that was not the normal behavior and so you can swop it out with the new preferences. You can that way discover if the new settings causes this situation and then figure out if you need it that badly. Especially if it happens repeatably.
    But this is s good feature request to be able to set the defaults of all tools all panels all menu items etc. One that will not be trashed when resetting the the defaults as they can be reloaded and rewritten fresh as if they where the factory load.
    I think it is time for the uer to have more say about ho they use any of the Adobe applications.

Maybe you are looking for

  • Premiere Pro is not responding and using 587% of CPU

    My projects are going extrordinarily slow. and according to the activity monitor, Premiere Pro is using 587% of the CPU and the fan is going non-stop and the macbook is always very hot when I start this program. I feel this could physically damage my

  • HP Officejet Pro L7590 paper jam

    The ADF jams shortly after accepting a page.  There is a lot of noise from the feeder wheels, but the page stays jammed until I lift the lid and then it will continue to feed just fine.  Help, please.

  • Get change document data

    How do we get the change document data to be used in a workflow, I have made entry in swec , there i associated the change object and my zbo delegeted from standard bo and specified the event as "on change". now i want to send a mail using this chang

  • I need to merge to clouds. A work cloud and a personal cloud togther.

    I have two clouds. One i set up for work and one my original cloud when I got first Iphone. How do I merge them both?

  • Mini crashes and restarts when attempting to play songs

    Hi, I just received this refurb 4gb mini(from the online apple store) and I was able to install eveything ok... but...after I loaded some songs onto it and went to play them, the darn thing crashes and goes back to the apple logo and reloads itself..