Saveas pdf without user input
Hi,
I'm trying to automate a process and batch handle a bunch of files. When I get to the saving, however, it pops up with a prompt and won't continue to the next files without user input confirming the save options. Is there anyway to surpress this popup?
I've tried using app.displayDialogs = DialogModes.NO but this just stops the dialog but doesnt actually save the file or continue onto the other files. It doesnt give me a popup if I dont change/set any of the PDFSaveOptions but then the PDF output isnt correct (it comes out squashed vertically).
#target photoshop
// PDF Options;
var sfwOptions = new PDFSaveOptions();
sfwOptions.PDFCompatibility = PDFCompatibility.PDF14;
sfwOptions.embedThumbnail = true;
sfwOptions.preserveEditing = true;
sfwOptions.presetFile = "[High Quality Print]";
function saveFile(fileName) {
var theNewName =splits[0] + fileName;
// Save PNG
var saveFile = new File( outputFolder + '/' + theNewName + '.pdf' );
//activeDocument.exportDocument( saveFile, ExportType.SAVEFORWEB, sfwOptions );
activeDocument.saveAs(saveFile,sfwOptions);
// Undo changes (go back to previous state)
myDocument.activeHistoryState = savedState;
}
