JavaScript API: replaceVariableImage
- 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
replaceVariableImage
PREMIUM
TRIAL / ADVANCED
Replaces image variables.
Note
You are reading the JavaScript API documentation. For the PHP API method please go to replacePlaceholderImage.
Description
replaceVariableImage (variables: Map<string, ArrayBuffer>, target: Target = "document", options: OptionsReplaceVariableImage = {}): this
This method allows to replace a placeholder image that may be fully formatted in Word (border, shadows, effects...) by an image of our choice.
The placeholder image should be tagged using the alternate text option of the Word interface (this may depend on the Word version).
Release notes
- phpdocx 15.0:
- new method.