How to detect error in JavaScript script for corrupt Illustrator file
Copy link to clipboard
Copied
I am trying to open a corrupt Illustrator file using JavaScript method app.open().
I am suppressing the warning dialog in the Illustrator before calling app.open():
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
The script is opening corrupt Illustrator file successfully.
However, if the same file is opened normally in Illustrator it is displaying the following warning:
Can't open the illustration. The illustration contains an illegal or misplaced operator.
Offending operator: Ý
Context: ÿÿÿÿÿÿÿ
After clicking "OK" on this warning dialog, Illustration is able to open the corrupt file. But it display partial content of the file.
Is their a way to catch such errors in the script for bad Illustrator file?
Or is it a bug in method app.open() which suppose to throw an exception in case of bad Illustrator file?
Thanks in advance.
Explore related tutorials & articles
Copy link to clipboard
Copied
no idea, can you post a corrupted file to try?
Copy link to clipboard
Copied
I cannot share the file on this forum because it belongs to over customer, so can please provide me your mail id. I will send it to you directly.
Copy link to clipboard
Copied
I'll PM you my email

