File conversion

Files not adhearing to the configured PDF flavour can be converted using a standalone conversion API. If a user uploads a file that doesn't adhere to the specified standard or that might be locked, the user will get an option to convert the file. If the user presses the convert button, the document will be converted. When the conversion has finished, the user must preview the document and approve the conversion before continuing the flow. If the user doesn't preview the file, only cancel is available and if the user cancels, the unconverted file will be used. If a user decide to not convert a file and cancel the conversion flow, the document needs to be re-uploaded to enable file conversion again.

This file conversion flow doesn't include an actual file converter, but rather provides an option to include your own file converter. If you want to add your own file converter, please contact Phenix ID support team to get more information on how to integrate your file conversion service into the SWF service. A built in file conversion service is currently on the roadmap.

Configuring file conversion

The file conversion feature can be configured using the documentConversion property in the main config file. There are four properties that needs to be configured:

  • enabled - Whether or not to enable the feature
  • preferredFlavour - The preferred flavour of the converted file
  • implementation - An array of the implemented file converter. The first implementation will used first and the second will be used as a fallback. If that fails, we will try the third, then the fourth and so on.
  • implementationConfigurations - Implementation specific configuration

This configuration only enables the file conversion on the API, not in the UI. To also enable it in the UI, you must set the convertFile property to true in the config.json file in your overlay settings folder.

Example configuration

  "documentConversion": {
    "enabled": true,
    "preferredFlavour": "1",
    "implementation": ["MyImplementation"],
    "implementationConfigurations": {
      "MyImplementation" : {
        "url": "https://myConverter.com/convert"
      }
    }
  }
Click to copy