June 15, 2018

PdfUserPassword - XpressDox

Provide a password on an assembled PDF document

This function gives you the ability to provide a user password to a PDF that is created by running a template. In other words, a person wanting to open the PDF file produced will have to supply the password to the application (e.g. Adobe Acrobat) which is being used to open the document.

 

The function can take either a string, in which case the password should be supplied in quotes, or a data element.

 

EXAMPLE 1:
«PdfUserPassword('The password')»

EXAMPLE 2:
«PdfUserPassword(FormatDate(DateOfBirth,'yyyyMMdd'))»
«Comment(This will create the user password which is the date of birth provided in the interview.)»

NOTE:The template will also need the «SaveAsPDF()» command to be present in order for the feature to take effect.