Copy link to clipboard
Copied
Hi All,
We all know that command:
app.activeDocument.save();
saves the document skipping all the dialogs and even alert that is popping out every time when you manually saving your file on a server:
My issue is that I am working on PDF files (with preserved Illustrator editing capabilities) almost all the time rather than .ai files, and everytime I use
app.activeDocument.save();
The .ai file is created.
My question is if it's possible to save PDF that you're working on same as you would manually 'Save' from the menu context, ommiting that annoying dialog about modified file?
Regards
Peter
Hi Carlos,
Almost there!
I managed to do it with:
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
app.executeMenuCommand ('save');
app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
Thanks again!
Copy link to clipboard
Copied
You should be able to "SaveAs", specifying the PDF as the type and choosing to not invoke the dialog box.
Hope this helps! -TT
Copy link to clipboard
Copied
@ThinkingThings my only issue will be the PDF preset currently used 'within' the file.
I work with many PDF files with variety of custom PDF settings (that for my understanding are carried through, while editing and overwriting the PDF, obviously these presets has to be installed on my machine).
Copy link to clipboard
Copied
if you have CS6 or newer, use
app.executeMenuCommand ('save');
Copy link to clipboard
Copied
Hi Carlos,
Almost there!
I managed to do it with:
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
app.executeMenuCommand ('save');
app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
Thanks again!