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

Script to save pdf with password

Community Beginner ,
Dec 08, 2017 Dec 08, 2017

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!

TOPICS
Scripting

Views

1.4K

Translate

Translate

Report

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

Copy link to clipboard

Copied

for which software ?

(Illustrator)

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

saveOpts.documentPassword = "password";

saveOpts.requireDocumentPassword = true;

Votes

Translate

Translate

Report

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