Password encryption
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
.
Option A: without a custom script (Ninox UI)
Option B: with a custom script
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.
Example
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.
Result
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.
Last updated