Copy link to clipboard
Copied
Hello,
I would really appreciate a script that can save the current file as pdf with password.
What I do normally is this:
1- Save as.
2- PDF Format.
3- Save in the same location as the original file.
4- Adobe PDF Preset: Smallest File Size
5- Go to "Security" then "Use a password to restrict..."
6- Set Password
Done.
I found this script in another thread on this forum:
var pdfFile = new File(app.activeDocument.fullName.toString().replace(".ai",".pdf"));
var saveOpts = new PDFSaveOptions(); //You can set PDF SaveOptions like below properties...
saveOpts.PDFXStandard = 2; //X1a 2001
app.activeDocument.saveAs (pdfFile, saveOpts);
Could this be modified to my needs?
Thanks!
Copy link to clipboard
Copied
for which software ?
(Illustrator)
Copy link to clipboard
Copied
saveOpts.documentPassword = "password";
saveOpts.requireDocumentPassword = true;