JavaScript API: openTemplate
- addBookmark
- addBreak
- addComment
- addCrossReference
- addDateTime
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addImage
- addLink
- addList
- addMergeField
- addPageNumber
- addSimpleField
- addStructuredDocumentTag
- addSvg
- addTab
- addTable
- addTableOfContents
- addTableOfFigures
- addText
- addWordFragment
- addWordMl
- getTemplateSymbols
- getTemplateVariables
- openTemplate
- processTemplate
- removeVariableImage
- removeVariableText
- replaceVariableCheckbox
- replaceVariableExternalFile
- replaceVariableImage
- replaceVariableInputField
- replaceVariableList
- replaceVariableTable
- replaceVariableText
- replaceVariableWordFragment
- replaceVariableWordMl
- setTemplateSymbols
openTemplate
PREMIUM
TRIAL / ADVANCED
Opens a DOCX template.
Note
You are reading the JavaScript API documentation. For the PHP API methods please go to PHP API.
Description
openTemplate (template: ArrayBuffer, options: OptionsTemplate = {}): Promise<this>
Errors
Error reading DOCX contents.
Code samples
Example #1
Release notes
- phpdocx 15.5:
- Get existing bookmark and numbering IDs when opening a template to avoid duplicated values in new contents.
- DOCM, DOTX and DOTM files as templates.
- phpdocx 15.0:
- new method.