password protect PDF

How can I secure the generated PDF, the function used for email attachements doesn’t work for simple PDF output.

Using:

merge.template.contexts.PRINT.sections[‘Section 1’].password = ‘secret’;
merge.template.contexts.PRINT.sections[‘Section 1’].ownerPassword = ‘secret’;

has no effect.

As far as I know this kind of password protection only works for PDF email attachments, but not for pdf print output only.

Workflow’s Create PDF plugin would allow to set encryption with password but needs a Design 7 file to work.

Or you’re using an external tool doing that separately after Connect output.