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

How to detect error in JavaScript script for corrupt Illustrator file

New Here ,
Oct 12, 2018 Oct 12, 2018

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.

TOPICS
Scripting
566
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
Community Expert ,
Oct 12, 2018 Oct 12, 2018

no idea, can you post a corrupted file to try?

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
New Here ,
Oct 22, 2018 Oct 22, 2018

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.

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 ,
Oct 23, 2018 Oct 23, 2018
LATEST

I'll PM you my email

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