Skip to main content
Skip table of contents

mergePPTX

A child command of composePPTXContent that brings content of another PPTX presentation into composed PPTX presentation produced by the parent command. The specified slides, their layouts, and optionally their slide masters and associated themes, are placed into the specified position, while any slides in that position and following are moved further to make way for the arriving slides.

Parent commands

Attributes

source

Required

Value type

EL-evaluated

Yes

File

Yes

Defines the PPTX presentation that provides the slides to import. The resolved File should therefore be a PPTX presentation file.

range

Required

Value type

EL-evaluated

No

String

Yes

This attribute can be used to specify which slides are moved from the other presentation. The resolved String should list numbers of the slides separated by commas (eg. "1,3,5,6,7"). Instead of slide number a slide range may also be specified by having the start and end numbers of the range with a hyphen between them (eg. "1,3,5-7").

If a slide number in the range is less than 1 or higher than the amount of slides in the other slides in the presentation, a warning is produced and no slide moved. However, even if the range contains invalid numbers, all valid numbers within the range will result in those slides being moved.  

If replaceExisting resolves into true, the range should specify only a single slide. Otherwise a warning is produced and the first slide of the range is used as the replacement.

If not defined, all slides of the presentation are imported.

adaptive

Required

Value type

EL-evaluated

No

Boolean

Yes

Defines how slide layouts and slide masters associated with the imported slides are handled.

If the resolved value is true, the imported slide "adapts" to the base presentation. The base presentation is searched for a a slide layout whose name matches the name of the imported slide's layout. If one is found, the imported slide will take that layout and receive the theme of the slide master of that layout. If a layout with a matching name is not found, the imported slide's layout is imported along with the slide and placed into one of the base presentation's slide masters.

If the resolved value is false, the imported slide will bring both its layout and master along, retaining its look from the original presentation.  

If undefined, the value of false is used.

insertTo

Required

Value type

EL-evaluated

No

Number, String

Yes

This attribute can be used to place the imported slides at a specific point at the presentation. The resolved value is expected to be a slide number, either as a Number or as a number-like String. The imported slides are then placed into that point of the base presentation, shifting the slide currently in that position so that it will follow the sequence of imported slides.

Note that this slide number is interpreted in the context of the presentation's original structure before any commands have altered it. If, for example, the slide that was originally number 2 has moved to become number 7 due to other commands placing more slides into the presentation, the value of '2' will refer to that slide despite its current number.

If undefined, the imported slides are placed at the end of the presentation.

removeFooter

Required

Value type

EL-evaluated

No

Boolean

Yes

Defines if placeholder shapes of certain type that typically form a footer are removed from the imported slides. If the resolved value is true, all shapes of types "dt" (Date and Time), "ftr" (Footer text) and "sldNum" (Slide Number) are removed.

If left undefined, the value of false is used and any footer shapes remain in the imported content.

replaceExisting

Required

Value type

EL-evaluated

No

Boolean

Yes

Defines if the merging operation will replace content instead of just adding content. If the resolved value of this attribute is true, the insertTo attribute is required to have a defined value and range should specify only a single slide. What will then happen is that the imported slide will replace the slide specified by insertTo. If range specifies multiple slides, a warning is produced and the first slide of the range is used as the replacement.

If undefined or the resolved value is false, the existing content is only moved, not replaced.

Examples

The mergePPTX command allows quite a few options through its attributes of which all but one are optional. If you just want all the slides of another presentation into the end of the presentation you're composing, only source needs to be defined.

CODE
<composePPTXContent var="composedPresentation" value="${presentationTemplate}"><mergePPTX source="${bonusSlides}">

If you'd like to define range through a Collection of Numbers or number-like Strings, the toString command can be of use, as it can transform the Collection into a proper range-defining String.

CODE
<toString var="slideRange" value="${selectedSlideNums}" itemName="num" expr="${num}"><composePPTXContent var="composedPresentation" value="${presentationTemplate}"><mergePPTX source="${appendixSlides}" range="${slideRange}">
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.