splitDocx

splitDocx

ADVANCED / PREMIUM TRIAL

Splits a Word document per section.

Description
public splitDocx (string $source, string $target, [array $options])

This method allows you to split per section a Word document.

Parameters

source

Path to the Word document.

target

Path to the resulting splitted documents.

options

The possible keys and values are (required options are shown with yellow background):

If type is 'image':

key Type Description
keepSections bool Preserve or not the original sections of the source document. If false uses the first section for all documents. Default as true.
sections array Sections to be splitted, all by default.
Exceptions

Error while trying to open the (base) template as a zip file.

Code samples

Example #1