Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Script to save pdf with password

Community Beginner ,
Dec 08, 2017 Dec 08, 2017

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!

TOPICS
Scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advocate ,
Dec 10, 2017 Dec 10, 2017

for which software ?

(Illustrator)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 11, 2017 Dec 11, 2017
LATEST

saveOpts.documentPassword = "password";

saveOpts.requireDocumentPassword = true;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines