About this article
This article explains what the image header setting is and provide examples of how it can be used with the binding syntax in smart templates.
- What is the image header setting?
- How to set the image header in a smart document
- Image header setup examples
Prerequisites
|
What is the image header setting?
The image header allows setting the image meant to appear in the header of a Word document, typically used for logos on company letterhead. The image header can be set dynamically by utilizing the binding syntax.
|
How to set the image header in a smart document
When building the template settings and properties, the Image Header
setting can be utilized to set the document header for the smart template. Setting the Image Header
setting can be achieved by following these steps:
- In the Template Designer, navigate to the
Advanced
tab - Click
Add property
- Select
Image Header
in theType
dropdown - Fill in the following fields
-
Image
: the binding to the desired image, e.g. {{UserProfile.Office.Logo.Image}} -
Shape Name
: the name for the image header, e.g. 'MyLogo'. Multiple image headers can be created each using a unique name -
Width/Height
: the width and height of the image- Static: enter a value in centimeters like "2.5 cm"
- Dynamic: enter the desired binding to retrieve the expected value
|
-
NamedSections
: the section(s) in which the image will be shown- Show the image in all sections:
{{NamedSections.All}}
- Show the image in section 1:
{{NamedSections.First}}
- Show the image in the last section:
{{NamedSections.Last}}
- Show the image in all sections:
|
-
NamedPages
: the page(s) on which the image will be shown- Show the image based on the Header & Footer settings from Word:
{{NamedPages.Default}}
- Show the image on the first page:
{{NamedPages.First}}
- Show the image on odd pages:
{{NamedPages.Odd}}
- Show the image on even pages:
{{NamedPages.Even}}
- Show the image on all pages no matter which settings are set in the Header & Footer from Word:
{{NamedPages.All}}
- Show the image based on the Header & Footer settings from Word:
|
-
NumberedSections (List)
: specify the specific sections in which the image will be shown -
LeftOffset
: the offset between the left side of the page and the image- Static: enter a value in centimeters like "2.5 cm"
- Dynamic: enter the desired binding to retrieve the expected value
-
Horizontal Relative Position
- Position of the image to the right from the margin:
{{HorizontalRelativePosition.Margin}}
- Position of the image from the left side of the page:
{{HorizontalRelativePosition.Page}}
- Position of the image to the right of the column:
{{HorizontalRelativePosition.Column}}
- Position of the image to the right of the character:
{{HorizontalRelativePosition.Character}}
- Position of the image to the right from the left margin:
{{HorizontalRelativePosition.LeftMargin}}
- Position of the image to the right from the right margin:
{{HorizontalRelativePosition.RightMargin}}
- Position of the image to the right from the inside margin:
{{HorizontalRelativePosition.InsideMargin}}
- Position of the image to the right from the outside margin:
{{HorizontalRelativePosition.OutsideMargin}}
- Position of the image to the right from the margin:
-
Horizontal Alignment
- Show the image horizontally to the left of the page:
{{HorizontalAlignment.Left}}
- Show the image horizontally to the right of the page:
{{HorizontalAlignment.Right}}
- Show the image horizontally in the center of the page:
{{HorizontalAlignment.Center}}
- Show the image horizontally to the right of the inside margin:
{{HorizontalAlignment.Inside}}
- Show the image horizontally to the right of the outside margin:
{{HorizontalAlignment.Outside}}
- Show the image horizontally to the left of the page:
-
TopOffset
: the offset between the top of the page and the image- Static: enter a value in centimeters like "2.5 cm"
- Dynamic: enter the desired binding to retrieve the expected value
-
Vertical Relative Position
- Position of the image below the margin:
{{VerticalRelativePosition.Margin}}
: - Position of the image from the top of the page:
{{VerticalRelativePosition.Page}}
- Position of the image below the paragraph:
{{VerticalRelativePosition.Paragraph}}
- Position of the image below the line:
{{VerticalRelativePosition.Line}}
- Position of the image below the top margin:
{{VerticalRelativePosition.TopMargin}}
- Position of the image below the bottom margin:
{{VerticalRelativePosition.BottomMargin}}
- Position of the image below the inside margin:
{{VerticalRelativePosition.InsideMargin}}
- Position of the image below the outside margin:
{{VerticalRelativePosition.OutsideMargin}}
- Position of the image below the margin:
-
Vertical Alignment
- Show the image vertically to the top of the page:
{{VerticalAlignment.Top}}
- Show the image vertically to the bottom of the page:
{{VerticalAlignment.Bottom}}
- Show the image vertically in the center of the page:
{{VerticalAlignment.Center}}
- Show the image vertically to the right of the inside margin:
{{VerticalAlignment.Inside}}
- Show the image vertically to the right of the outside margin:
{{VerticalAlignment.Outside}}
- Show the image vertically to the top of the page:
-
Image Text Wrapping
-
The header contains text then the image is shown in front of the text:
{{ImageTextWrapping.InFrontOfText}}
-
The header contains text then the image is shown behind the text:
{{ImageTextWrapping.BehindText}}
-
The header contains text then the image is shown in front of the text:
-
Rotation
- The image is rotated 90 degrees to the right:
{{Rotation.Clockwise90Degrees}}
- The image is rotated 180 degrees:
{{Rotation.Clockwise180Degrees}}}
- The image is rotated 90 degrees to the left:
{{Rotation.Counterclockwise90Degrees}}
- The image is rotated 90 degrees to the right:
-
Color
: specify the color transformation applied to an image- Default color transformation:
{{ColorType.Automatic}}
: - Grayscale transformation:
{{ColorType.Grayscale}}
- Black and white transformation:
{{ColorType.BlackWhite}}
- Mixed transformation:
{{ColorType.Mixed}}
- Default color transformation:
- Optionally, set an additional option to the setting
Disable updates
: Disallow the setting from being 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.
- Click
Add to document
- The
Image Header
setting will be added to the smart template
- The
|
Image header setting examples
Example 1
Using the Image Header
setting together with the IfElse() function in the Image
field of the Image Header
setting to display the Office logo based on the "IncludeLogo" checkbox originating from the response form.
The image is retrieved from the LogoInsertion data source, with a binding like {{UserProfile.Office.Logo.Image}}. Now the first step to add a new schema field (column) to the data source, e.g. 'NoImage' (you can use any name). The new schema field must be of TypeImage
! In the data source leave the column empty. The result looks like this:
Now in the Image HeaderImage
field replace the binding {{UserProfile.Office.Logo.Image}} with this binding: {{IfElse(Form.IncludeLogo, UserProfile.Office.Logo.Image, UserProfile.Office.Logo.NoImage)}}.
- If the "IncludeLogo" is checked, then the image is retrieved from the 'Image' column.
- If the "IncludeLogo" is not checked, the image would be retrieved from the 'NoImage' column, but since this column contains no images, nothing is returned!
Binding | {{IfElse(Form.IncludeLogo, UserProfile.Office.Logo.Image, UserProfile.Office.Logo.NoImage)}} | |
Input | Form.IncludeLogo = "☑" | Form.IncludeLogo = "☐" |
Output | Logo is inserted | Logo is not inserted |
Example 2
Using the Image Header
setting together with the IfElse() function in the Image
field of the Image Header
setting to display the Office logo based on the "ShowLogo" dropdown originating from the response form.
For this example configure the 'LogoInsertion' data source the same way as shown in example 1.
- If the "ShowLogo" answer is "Yes", insert the image located in the "LogoColor" of the "Office" data source
- If the "ShowLogo" answer is anything else than "Yes", insert the image located in the "NoLogo" of the "Office" data source, note that this column doesn't contain any image purposefully so the logo will not be inserted
Binding | {{IfElse(Equals(Form.ShowLogo.Name, "Yes"), UserProfile.Office.Logo.Image, UserProfile.Office.Logo.NoImage)}} | |
Input | Form.ShowLogo.Name= "Yes" | Form.ShowLogo.Name= "No" |
Output | Logo is inserted | Logo is not inserted |
Related articles
Comments
Article is closed for comments.