Search code examples
adobe-illustrator

Adobe Illustrator CC Can't open the illustration invalid operation argument


I have encountered a bug where using gradients sometimes randomly corrupts the illustrator file. When I open it I see the bug popup (yeah, I use Polish-localized version of Illustrator CC).

Adobe Illustrator bug

The bug report states something along:

Can't open the illustration. The illustration contains an invalid operation argument.

Offending Operator: Bd

Content:

%AI5_EndGradient

%AI5_BeginGradient:

I am using Windows 8.1. How can I recover my file?


Solution

  • You can follow the steps outlined in on that adobe page even though it states it's only for Illustrator CS2-CS5 it will work for CC as well.

    The file location for Windows 8 is:

    C:\Users\[ username ]\AppData\Roaming\Adobe\Adobe Illustrator 17 Settings\[localisation code]\[version]\
    

    localisation code for Poland will be pl_PL, but don't worry about that, there will most probably be just one folder in the Adobe Illustrator 17 Settings.

    version either x64 or x86, choose the one you are using

    The file you are looking for has also localised name for Polish it's: Preferencje programu Adobe Illustrator for other localisations it will be some translation of Adobe Illustrator Preferences

    in section:

    /aiFileFormat {
        /PDFCompatibility 1
        enableATEReadRecovery 0
        /enableContentRecovery 0
        /enableATEWriteRecovery 0
        /clipboardPSLevel 3
    }
    

    Set the enableContentRecovery flag to 1 /enableContentRecovery 1

    Then follow the "Starting Document Recovery" section from the link.

    When you have the _[your filename].ai file you need a huge text file editor so that you can remove offending operators. I have used 010 editor which has a 30 days trial.

    Open the file and search (ctrl+F) for the offending content, it's a markup language so you have to remove whole sections between %AI5_BeginGradient: [your gradient name] and %AI5_EndGradient.

    1. Remove one gradient.
    2. Save the file in your text editor.
    3. Try to open it in illustrator. (notice that the error message changes, if it doesn't try to look for the exact same name and remove it's section).

    Rinse and repeat until it opens.