JSON API - removeTemplateVariable

removeTemplateVariable

PREMIUM TRIAL / ADVANCED

Removes a phpdocx placeholder variable from the Word document.

Note

You are reading the JSON API documentation. For the PHP API method please go to removeTemplateVariable.

JSON data
Key Description
variable The name of the variable to be removed.
type It may be "inline" if one wants just to remove the variable or "block" (default value) if one wants also to remove the containing paragraph.
target Possible values are: document (default value), header, footer, footnote, endnote or comment.
firstMatch If the variable appears more than once within the Word document and firstMatch is set to true, phpdocx will only remove the first occurrence of the variable within the Word document.
Code samples

Example #1

A template can be a local file, a Base64 string, or a remote file.

Release notes
  • phpdocx 18.0:
    • new action.