Skip to main content

Configuration Files

Important

  • configurations are stored in ion files for each application
  • project configurations inherit tenant configurations which global configuration defaults

Directory layout

Example Directory Structure for a priint:cloud Project
myproject/
├── callback
│ └── config.ion # optional config for the callback webhook - define a notification address
├── error
│ └── config.ion # optional config for the error webhook - define a notification address
├── renderpdf
│ ├── comet_xml.zip # comet-xml project as zip file
│ ├── config.ion # optional config for the comet_pdf process
│ └── config-acc.ion # optional overrides for the above config when called with profile parameter set to 'acc'
├── restapi
│ ├── config.ion # optional config of default parameters for the REST API calls
│ └── config-acc.ion # optional overrides for the above config when called with profile parameter set to 'acc'
├── transform
│ └── xslt
│ └── dataxml.xslt # optional XSL templates file - transformation of input JSON or XML before rendering
├── upload
│ └── config.ion # optional config for the upload webhook - define the destination of created PDFs
└── config.ion # optional config for proxied URL connections

ion files

priint:cloud configurations are stored in /config.ion files for each application type (some of renderpdf, upload, etc.).

ion is a data format originally defined by Amazon AWS and essentially compatible with JSON-5, i.e. a lax variant of JSON. Every valid JSON file is also a valid ION file. In addition to standard JSON syntax we can use JavaScript like comments or omit the quotes around keys that contain no special characters.

Most configuration options allow detailed control about the processes backing the rendering. E.g. whether an input XML is allowed to contain data for more than one PDF; the exact version of the PdfRenderer used for a project; custom command line arguments for the PdfRenderer; handling of failed renderings, i.e. when and how often to retry; etc. All these details are left for the expert.

Here comes an example:

// /tenants/mytenant/projects/myproject/renderpdf/config.ion
{
cometPdfVersion: "R30316",
buildScript: "test2.py",
}

Configuration Inheritance

Project configuration files inherit properties from the tenant configuration files form the same application which itself inherit from some global defaults.

The global defaults are documented together with each application type.

An example for a tenant wide configuration:

// /tenants/mytenant/renderpdf/config.ion
{
cometPdfVersion: "R29333",
buildScript: "build.py",
maxExecutionMillis: 180000, // 3 min,
redeliverOnError: [
{
maxRedeliveries: 2,
redeliverIntervalMillis: 12000, // 2 min
},
],
}

Without this tenant wide configuration the effective value for maxExecutionMillis would be 60000 i.e. 1 min (from the global defaults).

When the configuration properties are itself structured objects or an array of objects like the redeliverOnError in the example then you must override the whole block in the project specific config file.

Using Profile Specific Configurations

REST API for rendering supports a query parameter to set a profile for the whole process chain of a ticket. E.g. POST /renderpdf?profile=test.

Profile specific configuration files are stored as e.g. /renderpdf/config-test.ion, i.e. the file name is build using the pattern config-{profile}.ion.

If a profile specific configuration is found it is always preferred. Profile specific configuration inherit from the default project configuration in the same style as the default project configuration inherits from the tenant configuration.

The profile parameter of the restapi supports a comma delimited list of profile names. In this case all profiles will be processed in the given order and the last config file will take the precedence.

As always profile specific configuration files are optional. If a file does not exist the system tries to find values from the next file in the hierarchy until some global or build-in default is found.

A complete configuration precedence for renderpdf if profile is set to "foo,bar":

[1] /tenants/mytenant/projects/myproject/renderpdf/config-bar.ion
[2] /tenants/mytenant/projects/myproject/renderpdf/config-foo.ion
[3] /tenants/mytenant/projects/myproject/renderpdf/config.ion
[4] /tenants/mytenant/renderpdf/config.ion
[5] /applications/renderpdf/config.ion (global default)