I'm encountering a problem when attempting to retrieve a list of PDF preset names in both AppleScript and JavaScript. Here are the steps I'm performing:
1) Launch Illustrator
2) Run the following AppleScript:
tell application "Adobe Illustrator"
PDF presets
end tell
or JavaScript:
app.PDFPresetsList;
When I run the AppleScript, I receive an error: "Adobe Illustrator got an error: an Illustrator error occurred: 1128353350 ('FNAC')" number 1200. (Sometimes, 'ACVI' is listed instead of 'FNAC'.)
When I run the JavaScript, I receive: "Result: undefined"
If I retrieve Illustrator's properties via AppleScript, I can see that the PDF presets property appears as 'missing value'.
The only workaround I've found is to manually go to Illustrator and choose "Edit > Adobe PDF Presets", and then immediately click "OK" to close the window. Whatever this does seems to fix the problem, and if I run the scripts again, they produce the correct results until Illustrator is relaunched, at which time the problem begins again. I'm wondering if anyone else is experiencing this, and if anyone has come up with any other workarounds, preferably one that doesn't require manual work.
Much appreciated.
-Ben