File validation

Files can be validated before they are accepted into a signature flow in order to simplify signing and archival processes. SWF comes with a number of built-in features for validating the files. If a file is uploaded, it can get one of the following statuses:

  • ACCEPTED
  • BAD_FORMAT
  • REJECTED
  • UNSUPPORTED
  • SIGNED
  • LOCKED
  • NEEDS_CONVERSION

PDF/A validation

PDF is not one single format, and SWF can be configured to validate the PDF/A standard of the uploaded PDFs. Administrators can adjust the approved flavours by setting this in the config.json file:

"signingTasks": {
  "usePdfAFlavours": [
    "PDFA_1_A",
    "PDFA_1_B",
    "PDFA_2_A",
    "PDFA_2_B",
    "PDFA_2_U",
    "PDFA_3_A",
    "PDFA_3_B",
    "PDFA_3_U"
  ]
}
Click to copy

If all PDF/A flavours should be accepted, use this:

"signingTasks": {
  "usePdfAFlavours": [ "NO_FLAVOUR" ]
}
Click to copy

If no PDF/A validation should be conducted, meaning all PDF formats will be accepted, not just PDF/A, set usePdfAFlavours to an empty array or null.

"signingTasks": {
  "usePdfAFlavours": null
}
Click to copy

Configuring Validation checks

PDFs can be validated, meaning they will be checked for:

  • Locks
  • Previous signatures

Locks

PDFs can have different kinds of locks, and SWF will check for known locks in the uploaded files. If a known lock is found, and the PDF lock validation functionality is enabled, the PDF is refused and the user can not create a task with that PDF. To continue, the user must update or replace the file.

Previously added signatures

This functionality will check for previously added signatures. If previously added signatures are found, the file will be refused and the user has to use another file.

To enable validation functionality, set this is the root of your config.json file:

"signingTasks": {
  "disableDocumentChecks": false
}
Click to copy
  • signingOrders - The wrapper object
  • disableDocumentChecks - Option to disable document checks. If `true`, no checks of the files will be done