RenderPptx
This configuration sets general rules how pptx rendering is done.
The configuration is located in /renderpptx/config.ion.
The configuration file itself is optional.
All properties in the configuration file are also optional.
Project config files inherit properties from tenant config files which inherit from the global defaults as given below.
Project Configuration Default Settings
RenderPptx config may differ a lot in practice. The following are the default settings that are applied if you do not specify anything. This is not meant as boilerplate code.
// /tenants/mytenant/projects/myproject/renderpptx/config.ion
{
// properties specific to PowerPoint rendering
allowMultiplePlaceholderPerName: false,
allowMultiplePlaceholderPerType: false,
allowMultipleShapesPerName: false,
insertNewSlidesAfter: 0, // the slide number is 1-based
keepExistingSlides: false,
mapPlaceholdersByName: true,
mapPlaceholdersByType: false,
mapShapesByName: false,
preferredView: "normal",
// properties shared with other rendering workers such as renderpdf and rendercss
documentTemplate: "default",
keepLog: "onerror",
keepLogForSeconds: 86400,
keepLogUntil: "shippedOrExpired",
keepOutput: "onsuccess",
keepOutputUntil: "shippedOrExpired",
keepOutputForSeconds: 86400, // 1 day
maxExecutionMillis: 3600000, // 1 h
redeliverOnError: [],
}
PowerPoint Handling Configuration
allowMultiplePlaceholderPerName
If placeholders are mapped by their names you can set this property to true to allow multiple placeholders with the same name.
If the data also contains multiple items with the same name, then the n-th placeholder gets the n-th data.
Otherwise, if allowMultiplePlaceholderPerName is false or if there is an n-th placeholder without an n-th data item, the placeholder will be mapped to the last valid data item.
allowMultiplePlaceholderPerType
If placeholders are mapped by their types you can set this property to true to allow multiple placeholders with the same type.
If the data also contains multiple items with the same type, then the n-th placeholder gets the n-th data.
Otherwise, if allowMultiplePlaceholderPerType is false or if there is an n-th placeholder without an n-th data item, the placeholder will be mapped to the last valid data item.
allowMultipleShapesPerName
If placeholders are mapped by their types you can set this property to true to allow multiple placeholders with the same type.
If the data also contains multiple items with the same type, then the n-th placeholder gets the n-th data.
Otherwise, if allowMultiplePlaceholderPerType is false or if there is an n-th placeholder without an n-th data item, the placeholder will be mapped to the last valid data item.
insertNewSlidesAfter
The slide number after which the new slides are inserted.
This only applies if keepExistingSlides was set to true.
Default is 0 meaning that new slides are inserted before all existing slides.
keepExistingSlides
If the template PPTX already contains slides (not master slides), these slides will be removed per default before the new slides are inserted.
Set this property to true to keep the existing slides.
This is typically used together with the insertNewSlidesAfter property.
mapPlaceholdersByName
Data elements of type <placeholder name="myPlaceHolderShape" /> are mapped to shapes on the slide layout using the name of the placeholder shape.
mapPlaceholdersByType
Data elements of type <placeholder type="myPlaceHolderType" /> are mapped to shapes on the slide layout using the type of the placeholder shape.
General Rendering Configuration
documentTemplate
Optional name of the document template for the pptx process.
- Data Type: String
- Default:
default
Requirements
- The name documentTemplate must correspond to a pptx template file in the PowerPoint folder of the pptx project (i.e.
/powerpoint/default.pptxin the/renderpptxfolder given the example above). - the default document template is named "default" and therefore points to a file default.pptx
Places to define documentTemplate in order of precedence:
- query parameter of the REST API e.g.
POST /renderpptx?documentTemplate=foobar) - config property in
/restapi/config.ion - config property in
/renderpptx/config.ion - config property in global default
maxExecutionMillis
Optional maximum runtime for the pptx process.
- Data Type: int
- Default: 3600000 (1 h)
If maxExecutionMillis is exceeded, then:
- The running pptx process is destroyed.
- ExitCode 504 will be registered.
Output Handling Configuration
keepOutput
Optional rule to set whether the pptx files should be stored in the backend.
- Data Type: Enumeration
never: PPTXs are deleted immediately after the pptx process endsonerror: PPTXs are stored only if pptx process ended with an erroronsuccess: PPTXs are stored only if pptx process ended with a successalways: PPTXs are stored in any case
- Default:
onsuccess
keepOutputForSeconds
Optional expiry duration for pptx artifacts.
- Data Type: int
- Default: 86400 (1 day)
keepOutputUntil
Optional rule for deletion of the log.
Data Type: Enumeration
shipped: delete pptx after the output was successfully "shipped" (see below) to the end userexpired: delete pptx if expiry is exceededshippedOrExpired: delete pptx if job artifact state matches any of "shipped" or "expired"forever: do not delete pptx automatically on a job event (PPTXs might be deleted later due to other cleanup processes)- Default:
shippedOrExpired
- A job artifact is considered as
shippedif one of the following is true:- Upload worker ends successfully with HTTP 2xx.
- pptx artifact was downloaded successfully via REST API endpoint
GET /{project}/storage/{ticket}.
- A pptx is considered as
expiredifkeepLogForSecondsis exceeded. - Deletion may not happen immediately because files often are only "marked" for deletion.
The following properties mainly control the handling of log and debug files.
The storage properties (keepLog, keepLogUntil, keepLogForSeconds) apply to all files created
during the pptx call except for the pptx artifact itself. This includes content.xml,
etc.
Log Handling Configuration
keepLog
Optional rule to set whether the log files should be stored in the backend.
- Data Type: Enumeration
never: log files are deleted immediately after the pptx process endsonerror: log files are stored only if pptx process ended with an erroronsuccess: log files are stored only if pptx process ended with a successalways: log files are stored in any case
- Default:
onerror
keepLogForSeconds
Optional expiry duration for log files.
- Data Type: int
- Default: 0 (seconds)
keepLogUntil
Optional rule for deletion of the log.
Data Type: Enumeration
shipped: delete log files after the output was successfully "shipped" (see below) to the end userexpired: delete log if expiry is exceededshippedOrExpired: delete log if job artifact state matches any of "shipped" or "expired"forever: do not delete the log automatically on a job event (logs might be deleted later due to other cleanup processes)- Default:
enableLogOnError
- A job artifact is considered as
shippedif one of the following is true:- Upload worker ends successfully with HTTP 2xx.
- pptx artifact was downloaded successfully via REST API endpoint
GET /{project}/storage/{ticket}.
- A log is considered as
expiredifkeepLogForSecondsis exceeded. - Deletion may not happen immediately because files often are only "marked" for deletion.
Error Handling Configuration
See Redelivery On Error.