JavaScript to prompt user to save as PDF
I am making changes with code to the file. I want the user to be prompted to save as a .ai file first. I have that down. Now I am wanting to have the user immediately be prompted to save as a pdf with only the optimize for fast web view option selected. I believe it is an adobe preset of Smallest File Size.
The reason for wanting the prompt is because I want to save the files in 2 different locations.
Here is my code so far.....
var doc = app.activeDocument;
// Save as .ai file
var fileName = doc.fullName;
var thisFile = new File(fileName);
var saveFile = thisFile.saveDlg();
doc.saveAs (saveFile);
// Save as .pdf file
var pdfSaveOptions = new PDFSaveOptions();
pdfSaveOptions.pDFXStandard=PDFXStandard.PDFXNONE;
pdfSaveOptions.compatibility = PDFCompatibility.ACROBAT5;
pdfSaveOptions.preserveEditability = false;
var pdfFile = new File(fileName);
doc.saveAs(pdfFile, pdfSaveOptions);
AI CS4 Windows 7 64bit