You should be able to "SaveAs", specifying the PDF as the type and choosing to not invoke the dialog box.
Hope this helps! -TT
@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).
if you have CS6 or newer, use
I managed to do it with:
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; app.executeMenuCommand ('save'); app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;