optimizeTemplate

optimizeTemplate

PREMIUM BASIC / ADVANCED

Process a DOCX to get the best performance when using the document as a template.

Description
public optimizeTemplate (string $source, string $target, array $variables = array(), string $templateSymbolStart = '$', string $templateSymbolEnd = null, bool $parseMode = false)
Parameters

source

DOCX document to be optimized.

dest

Destination path of the optimized template.

variables

Array of variables to be optimized.

templateSymbolStart

The symbol used for identifying placeholder variables within templates.

templateSymbolEnd

The symbol used for identifying placeholder variables within templates.

parseMode

If true uses the parse mode to repair and get variables. Default as false.

Code samples

Example #1: