Answered
Does this code snippet work for you?
var saveFile = File("~/Desktop/"+app.activeDocument.layers[0].name+".pdf")
pdfSaveOptions = new PDFSaveOptions();
// You should still set the desired PDF save options - but for test purposes it also works without them
activeDocument.saveAs(saveFile, pdfSaveOptions);
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
