Password encryption
Last updated
Last updated
If needed, encrypt a rendered report with a password.
Either toggle ON the option Set password in the Ninox UI, or alternatively use a custom script and the functions printRecord
or printAndSaveRecord
.
Works with printRecord and printAndSaveRecord.
The data
object can include the property _options
with pdfPassword
which overrides the default settings set by the print engine in the Ninox UI, if you previously toggled OFF Set password.
An empty password like""
will not encrypt your report.
Add a new layout element, here: a button.
Paste the script below in the formula editor.
Save changes.
Click or tap the button to run the script.
A report (PDF file) is created and downloaded to your local files. When you open the PDF from your browser, you are prompted to enter a password to open the document.