This article explains how to insert custom image binding through smart fields so it can populate the dynamic document.
Prerequisites
|
ImportantPlease note that the Template tab is only available in Word and PowerPoint. Inserting images dynamically into a Spreadsheet for Excel is not supported. |
When building a smart template, use the Custom image binding smart field to achieve specific use cases that require more complex bindings. The Custom image binding smart field requires a good understanding of the binding syntax as well as conditions, functions and operators. Through this smart field images can be inserted. Follow these steps to create a Custom image binding smart field:
- In Template Designer, navigate to the Template tab.
- Select the location where the smart field should be inserted.
Type and select a placeholder text.Select the desired shape. - Click Add smart field.
This step doesn't apply if you are adding the very first smart field in the template. - Click Custom image binding.
- Add the Display name.
The display name will be displayed in the Template tab once the smart field has been added. - Insert the desired binding.
In this example an App connector (HostSystem) binding is used:{{HostSystem.Product.Image}}
- Optionally, perform additional actions on the smart fields:
-
Inherit Dimensions: The Inherit Dimensions dropdown provides the option to inherit the native width and height of the image:
- InheritNone: nothing is inherited.
- InheritWidth: the native width of the image is inherited.
- InheritHeight: the native height of the image is inherited.
- Custom inheritDimensions: provide a custom expression to inherit dimensions.
-
Width/Height: The fields Width and Height allow the user to adjust the size of the inserted images by statically defining the values, like '3.75 cm' or by using a binding to define them. The binding can refer to a data source that contains width and/or height.
If only the width is defined, the height will be adjusted and set upon creation, and the other way around.Important
- Dimension must always be added in centimeters.
- A decimal must be used as separator (e.g. '3.75 cm').
- Visibility: Edit the visibility of the smart field based on specific conditions.
- Allow updates: Allow the smart field to be updated after its generation when edited by the user through the document content updater. This option will not be visible if the document content updater is not enabled on the smart template.
- Remove and keep content: This will remove the content control upon document generation and therefor disable the document content updater on this smart field.
-
- Click Add to template.
The smart field will be injected into the template and will be displayed in the Template tab:
Note
|
Important
|
Comments
Article is closed for comments.