Get a list of PDF presets

2 min readJun 30, 2023

When you try to retrieve a list of saved presets app.PDFPresetsList in Illustrator, you may receive the error an Illustrator error occurred: 1128353350 ('FNAC').

Script aborts after an error has occurred

First, the property must be wrapped in try…catch so that the script doesn’t break. Second, this script error is only fixed if you open the Edit → Adobe PDF Presets window once in Adobe Illustrator.

All you have to do is close the window

The menu can be opened directly from the script for users of Illustrator versions CS6 and higher in the try…catch block, and for others it displays instructions on how to fix the error themselves.

// move it to start
try {
var pdfPresets = app.PDFPresetsList;
} catch (err) {
var msg = 'Error getting PDF presets\n';
if (parseInt(app.version) >= 16) {
msg += 'The Adobe PDF Preferences window opens to fix the error.\n';
msg += 'Press Ok';
app.executeMenuCommand('PDF Presets');
} else {
msg += 'To fix the error, choose Edit > Adobe PDF Preferences once';
msg += 'before the script and close';
// do something




Sergey Osokin. Product Illustrator, Icon Designer, Script Developer (Ai, Ps). Writing about bugs and tricks in Adobe Illustrator scripts