powerpoint-orchestrator
Reactive icon

PowerPoint Orchestrator

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 20 Jun
 by 
0.0
 (0 ratings)
powerpoint-orchestrator

PowerPoint Orchestrator

Documentation
1.0.0

PowerPoint Orchestrator Forge

Version: 1.0  Platform: OutSystems Forge Underlying Library: PPTXGenJS


Overview

PowerPoint Orchestrator is an OutSystems Forge component that enables browser-side generation of rich PowerPoint (.pptx) files without any server-side processing. It wraps the PPTXGenJS library as a suite of OutSystems Client Actions, giving developers a structured, composable API to build presentations programmatically — including support for text, images, tables, bullet lists, master slides, and RTL layouts.

All generation happens entirely in the browser. The final output is triggered as a standard file download via the DownloadPresentation action.


Architecture Notes

  • All Client Actions execute in the browser via JavaScript. No server round-trips are required for generation.
  • Complex inputs are passed through OutSystems' ToObject() mechanism. Internally, the component uses a shared osUnwrap() utility to normalize the proxy structure this produces.
  • The Presentation object returned by CreatePresentation must be threaded through every subsequent action and recaptured at each step. OutSystems copies Object local variables on input, so slide references are resolved internally via pres._slides[index] rather than being passed directly.
  • Theme configuration (primary color, font, RTL flag, etc.) is stored on pres._theme so it remains accessible to all downstream slide actions without needing to be re-supplied.

Setup

Initiator — UI Block

Place the Initiator block once on any screen that uses PowerPoint Orchestrator Client Actions. It is an invisible initializer that loads the PPTXGenJS library into the browser at render time.

The block uses an Always False condition so it never renders visible content — it exists purely to guarantee the script is available before any generation action runs.

Usage: Drag it onto the screen, typically near the top of the layout. One instance per screen is sufficient.


Client Actions

Actions follow a create → build → render → download lifecycle:

CreatePresentation
  └─ CreateSlide
       ├─ AddTextToSlide
       ├─ AddImageToSlide
       ├─ AddShapeToSlide
       ├─ AddTableToSlide
       └─ AddBulletsToSlide
DownloadPresentation

CreatePresentation

The entry point of the PowerPoint Orchestrator engine. Initializes a new, isolated PPTXGenJS instance in memory, resolves layout dimensions, handles branding and background media fallback logic, and configures localization parameters such as RTL mode.

Returns a Presentation object reference that must be passed into every subsequent action.

Input Parameters

ParameterTypeDescription
PresentationConfigStructurePresentation-level configuration (see attributes below)

PresentationConfig Attributes

AttributeTypeDefaultDescription
LayoutIdText"LAYOUT_16x9"Slide layout blueprint. Accepted values: "LAYOUT_16x9", "LAYOUT_16x10", "LAYOUT_4x3", "LAYOUT_WIDE". Overridden if Width and Height are set.
TitleTextPresentation metadata file title.
AuthorTextPresentation metadata creator credit.
PrimaryColorText"4C3BAF"Hex color value (without #) applied to downstream corporate themes.
FontFaceText"Arial"Primary font family applied across downstream text assets.
IsRTLBooleanFalseEnables global Right-To-Left text direction and registers the Arabic (ar-SA) localization profile.
BgColorTextDefault hex background color applied to slides.
WidthDecimal0Custom layout width in inches. Takes precedence over LayoutId when greater than zero.
HeightDecimal0Custom layout height in inches. Takes precedence over LayoutId when greater than zero.

Output Parameters

ParameterTypeDescription
PresentationObjectSerialized reference to the active PPTXGenJS presentation instance. Pass this into every subsequent action and capture the updated output at each step. Feed the final value into DownloadPresentation to trigger the file download.

CreateSlide

Appends a new slide to the presentation. Accepts optional background overrides at the slide level, which take precedence over the defaults established in CreatePresentation.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object returned by CreatePresentation or a prior action.
SlideConfigStructureOptional slide-level configuration (see attributes below)

SlideConfig Attributes

AttributeTypeDescription
BgColorTextHex background color for this slide. Overrides the presentation-level default.
BgImageUrlTextFallback URL for this slide's background image.
BgImageBinaryBinaryBinary image for this slide's background. Takes priority over BgImageUrl.
MasterNameTextName of a previously defined master slide to apply to this slide.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.
SlideIndexIntegerZero-based index of the newly created slide. Pass this to content-adding actions to target this slide.

AddTextToSlide

Places a styled text block onto a slide at a specified position.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
SlideIndexIntegerZero-based index of the target slide.
TextInStructureText content, position, and font styling (see attributes below)

TextIn Attributes

AttributeTypeDescription
TextTextThe text content to render.
XDecimalHorizontal position in inches from the left edge.
YDecimalVertical position in inches from the top edge.
WidthDecimalWidth of the text box in inches.
HeightDecimalHeight of the text box in inches.
FontSizeIntegerFont size in points.
FontFaceTextFont family override for this text block. Falls back to the presentation-level FontFace.
BoldBooleanRenders the text bold.
ItalicBooleanRenders the text italic.
ColorTextHex text color.
AlignTextHorizontal alignment: "left", "center", "right", "justify".
IsRTLBooleanOverrides RTL direction for this specific text block.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.

AddImageToSlide

Places an image onto a slide at a specified position and size. Accepts binary data, data URLs, or plain URLs.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
SlideIndexIntegerZero-based index of the target slide.
ImageConfigStructureImage source and position configuration (see attributes below)

ImageConfig Attributes

AttributeTypeDescription
ImageBinaryBinaryOutSystems binary image. Takes priority over ImageUrl.
ImageUrlTextFallback absolute URL or data URL for the image.
XDecimalHorizontal position in inches.
YDecimalVertical position in inches.
WidthDecimalRendered image width in inches.
HeightDecimalRendered image height in inches.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.

AddShapeToSlide

Draws a built-in PPTXGenJS shape (rectangle, ellipse, line, etc.) onto a slide with optional fill, border, and text overlay.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
SlideIndexIntegerZero-based index of the target slide.
ShapeConfigStructureShape type, position, and styling (see attributes below)

ShapeConfig Attributes

AttributeTypeDescription
ShapeTypeTextPPTXGenJS shape identifier (e.g., "rect", "ellipse", "line").
XDecimalHorizontal position in inches.
YDecimalVertical position in inches.
WidthDecimalShape width in inches.
HeightDecimalShape height in inches.
FillColorTextHex fill color.
LineColorTextHex border/line color.
LineWidthDecimalBorder width in points.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.

DefineMasterSlide

Registers a named master slide on the presentation. Slides can reference this master by name via SlideConfig.MasterName to inherit background, font, and layout defaults.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
MasterConfigStructureMaster slide definition (see attributes below)

MasterConfig Attributes

AttributeTypeDescription
TitleTextUnique name used to reference this master in CreateSlide.
BgColorTextHex background color.
BgImageUrlTextFallback URL for the background image.
BgImageBinaryBinaryBinary background image. Takes priority over BgImageUrl.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.

CreateTable

Initializes an empty table object with defined column structure. Follow this with AddRowToTable calls in a loop, then AddTableToSlide to render.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
TableConfigStructureColumn definitions and table-level styling (see attributes below)

TableConfig Attributes

AttributeTypeDescription
ColWidthsList of DecimalWidth in inches for each column. Length determines the column count.
HasHeaderRowBooleanTreats the first row added as a styled header row.
FontSizeIntegerDefault font size for all cells.
FontFaceTextFont family for all cells. Falls back to the presentation-level FontFace.
HeaderFillColorTextHex fill color for the header row.
HeaderFontColorTextHex font color for the header row.
AutoPageBooleanEnables PPTXGenJS auto-pagination — overflowing rows continue on a new slide.
AutoPageRepeatHeaderBooleanRepeats the header row at the top of continuation slides when AutoPage is true.
NewSlideStartYDecimalY position in inches where content begins on continuation slides.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.
TableObjectObjectThe initialized table object. Pass this into AddRowToTable and then AddTableToSlide.

AddRowToTable

Appends a row of cells to a table object. Call in a loop for each data row.

Input Parameters

ParameterTypeDescription
TableObjectObjectThe table object returned by CreateTable.
RowDataList of StructureOne entry per cell. Each entry mirrors the TextIn structure (Text, FontSize, Bold, Italic, Color, Align, IsRTL).

Output Parameters

ParameterTypeDescription
TableObjectObjectUpdated table object. Capture and pass forward.

AddTableToSlide

Renders a completed table object onto a slide at a specified position.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
SlideIndexIntegerZero-based index of the target slide.
TableObjectObjectThe fully populated table object.
XDecimalHorizontal position in inches.
YDecimalVertical position in inches.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.

CreateBulletList

Initializes an empty bullet list object with shared styling. Follow this with AddItemToBulletList calls, then AddBulletsToSlide.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
BulletConfigStructureList-level styling (see attributes below)

BulletConfig Attributes

AttributeTypeDescription
BulletStyleIdTextStatic entity identifier selecting the bullet style (shape, dash, numbered, etc.).
FontSizeIntegerDefault font size for all items.
FontFaceTextFont family for all items.
ColorTextHex text color for all items.
IsRTLBooleanApplies RTL direction to all bullet items.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.
BulletListObjectObjectThe initialized bullet list object. Pass into AddItemToBulletList.

AddItemToBulletList

Appends a single item to a bullet list. Each item advances the indent level automatically. Call in a loop.

Input Parameters

ParameterTypeDescription
BulletListObjectObjectThe bullet list object returned by CreateBulletList.
TextInStructureText content and inline styling for this item (same TextIn structure used in AddTextToSlide).

Output Parameters

ParameterTypeDescription
BulletListObjectObjectUpdated bullet list object. Capture and pass forward.

AddBulletsToSlide

Renders a completed bullet list onto a slide at a specified position.

Input Parameters

ParameterTypeDescription
PresentationObjectThe active presentation object.
SlideIndexIntegerZero-based index of the target slide.
BulletListObjectObjectThe fully populated bullet list object.
XDecimalHorizontal position in inches.
YDecimalVertical position in inches.
WidthDecimalWidth of the text area in inches.
HeightDecimalHeight of the text area in inches.

Output Parameters

ParameterTypeDescription
PresentationObjectUpdated presentation object. Capture and pass forward.

DownloadPresentation

Triggers a browser file download of the finalized presentation as a .pptx file. Call this as the final step after all slides and content have been added.

Input Parameters

ParameterTypeDescription
PresentationObjectThe final presentation object after all content has been added.
FileNameTextOutput filename without extension. Defaults to "presentation" if left empty.

Output Parameters

None. The browser initiates the file download directly.


GetForgeStaticData

Returns static reference data used by the component, including available layout identifiers, bullet style entities, and shape type identifiers. Useful for populating dropdowns in builder UIs.

Input Parameters

None.

Output Parameters

ParameterTypeDescription
LayoutIdsList of TextSupported LayoutId values for PresentationConfig.
BulletStyleIdsList of StructureAvailable bullet style entities with Id and display label.
ShapeTypesList of TextSupported ShapeType values for ShapeConfig.

Typical Usage Flow

Below is a minimal flow for generating a single-slide presentation with a title text block and a table.

1. Place Initiator block on the screen (once).

2. CreatePresentation
      PresentationConfig.Title       = "Q3 Report"
      PresentationConfig.PrimaryColor = "1A73E8"
      PresentationConfig.IsRTL        = False
   → Presentation

3. CreateSlide
      Presentation = Presentation
      SlideConfig.BgColor = "FFFFFF"
   → Presentation, SlideIndex (= 0)

4. AddTextToSlide
      Presentation = Presentation
      SlideIndex   = 0
      TextIn.Text  = "Quarterly Results"
      TextIn.X = 0.5, TextIn.Y = 0.3
      TextIn.Width = 9, TextIn.Height = 1
      TextIn.FontSize = 32, TextIn.Bold = True
   → Presentation

5. CreateTable
      TableConfig.ColWidths        = [2.5, 2.5, 2.5, 2.5]
      TableConfig.HasHeaderRow     = True
      TableConfig.HeaderFillColor  = "1A73E8"
      TableConfig.HeaderFontColor  = "FFFFFF"
   → Presentation, TableObject

6. AddRowToTable (loop for each row)
      TableObject = TableObject
      RowData     = [cell1, cell2, cell3, cell4]
   → TableObject

7. AddTableToSlide
      Presentation = Presentation
      SlideIndex   = 0
      TableObject  = TableObject
      X = 0.5, Y = 1.5
   → Presentation

8. DownloadPresentation
      Presentation = Presentation
      FileName     = "Q3_Report"

RTL Support

RTL (Right-To-Left) support is available at multiple levels:

LevelHow to Enable
Presentation-wideSet PresentationConfig.IsRTL = True in CreatePresentation
Individual text blockSet TextIn.IsRTL = True in AddTextToSlide
Table cellSet IsRTL = True on the cell's TextIn entry in AddRowToTable
Bullet listSet BulletConfig.IsRTL = True in CreateBulletList

When IsRTL is enabled at the presentation level, the Arabic (ar-SA) localization profile is registered automatically.

Table cell RTL — implementation note: PPTXGenJS does not accept rtlMode as a direct cell property. RTL is applied at the cell level by structuring the cell content as an array where the text string is the first element and the options object (containing rtlMode: true) is the second. This workaround is handled internally by AddRowToTable — consumers simply set IsRTL = True on the cell's TextIn entry as normal.


Known Limitations

  • Multi-line cell content: Not supported in V1. Each table cell renders as a single text run.
  • Image in table cell: Not supported in V1.
  • Internal API dependency: Slide lookup uses pres._slides[index], which is specific to the bundled PPTXGenJS version. Upgrading the library requires re-validating this accessor.

Dependencies

DependencyRole
PPTXGenJSCore PowerPoint generation library (browser-bundled)
OutSystems ToObject()Required to pass Record/Structure types into Client Action JS — normalized by the internal osUnwrap() utility