Skip to main content
Version: 4.49.0-beta

Exec

The Exec component allows you to execute third party command line applications. This way you can run advanced transformations on your content using tools like:

  • powerpdf
  • imageMagick
  • pdftk
  • 7zip

Configuration

Command

The executable to use. This can be an absolute path to the executable or the name of the executable if it is in the PATH environment variable.

In order to be able to execute a command, the path to the executable must be whitelisted in the XILL4_EXEC_PATHS environment variable as described in Environment Variables . Failing to do so will result in an error on configure and the component will not be able to execute the command.

Examples:

C:\\Program Files\\7-Zip\\7z.exe
7z

Timeout (in ms)

The timeout for the command to finish executing. Default: 5 minutes.

Encoding

The encoding on which the command should be executed. Default: utf8.

Inputs

  • Name: Input

    • Description: A message containing the arguments key to pass to the command. The example below illustrates how this can be achieved.

    • Example:

      The command 7z a -t7z files.7z *.txt can be executed with the following input:

      {
      "arguments": [
      "a",
      "-t7z",
      "files.7z",
      "*.txt"
      ]
      }
    note

    Both argument keys and argument values need to be separated.

    • Example:

      With magick

      Incorrect

      {
      "arguments": [
      "Path\\To\\Image.png",
      "-resize 50%",
      "Path\\To\\outputImage.png",
      ]
      }

      Correct

      {
      "arguments": [
      "Path\\To\\Image.png",
      "-resize",
      "50%",
      "Path\\To\\outputImage.png",
      ]
      }

Outputs

  • Name: Output

    • Description: Outputs whatever the command might return, combined with the incoming message.

    • Example:

      {
      value: {
      // The incoming message
      },
      result : {
      // Command output
      }
      }
      note

      A lot of command line tools do not return a message on success. In that case the result field will be empty.