How do I mask fields on the output PDF?

Follow

Starting with NFS 1.2.2, there is a hot fix that allows fields to be masked in server generated PDF output. By configuring fields with a mask type, the resulting PDF will alter the value to preserve security or privacy. These directions are intended for customers and partners who have their own naturalForms Server (NFS).

 

This hot fix is intended as a short-term fix and will be replaced in a future release.  At that time all output settings will have to be updated for the masking to continue functioning properly.

 

 

Sample ConfigurationInputOutput
[
  {
    "name": "PhoneNumber",
    "absoluteLeadingMask": "###-###-xxxx"
  }
]
937-555-1212 937-555-xxxx
[
  {
    "name": "SocialSecurity",
    "absoluteTrailingMask": "*####"
  }
]
123-45-6789 *6789
[
  {
    "name": "Password",
    "maskingCharacter": "*"
  }
]
MyPassword **********

 

To install the hotfix, you will need to create JSON configuration files and place them in the NFS configuration directory.

C:\Documents and Settings\All Users\Application Data\naturalForms\Config

 

Within the configuration directory, create a directory tree using the following pattern:

...\naturalForms\Config The NFS configuration directory
  \HotFix The hot fix directory
    \10002 A directory named with the customer ID
      \PdfFieldMask The name of the hot fix
        hotfix-123456789.json A file named with the template ID

 

The mask should go into effect with the next PDF generated by output, without the need to restart the server. The content of the JSON file is an array of fields within the template, allowing multiple fields to be masked with one file. For example:

[
  {
    "name": "Field1",
    "maskingCharacter": "*"
  },
  {
    "name": "Field2",
    "absoluteTrailingMask": "*####"
  }
]

 

Formatting Fields

Some masking may imply a specific format for data entered into a field.  

Example:

Mask:    ***-***-#### 

Correct: 937-439-6777

Incorrect: 9374396777

In these cases we recommend that you include a behavior to ensure consistency.  The behavior might look like ^\d\d\d-\d\d\d-\d\d\d\d$

 

Disabling Sharing Options

The masking only takes place on the NFS generated PDF. Therefore, you will want to disable sharing from the tablet. This means that the user will no longer be able to email, send to dropbox, or print the PDF from within naturalForms enterprise.

To disable sharing, you will need to open Form Flags in Forms Manager for the form template and check the following three flags:

  • Disallow emailing of PDFs
  • Disallow printing of PDFs
  • Disallow sending PDFs to Dropbox
Have more questions? Submit a request

Comments

Powered by Zendesk