Using Variables in a Place Content HTML template to place text
As the normal "Place text" Fixup does not offer many options to define e.g. the font to be used for text, using a small template incl. CSS is an easy way to get more control about the layout of the placed text.
To use a template, the type of Fixup "Place content on page" has to be used.
As the text is variable in most cases, a normal variable (with keyword of the Variable: "placetext") is used within the attached Fixup.
In the HTML file, the place where the text shall be positioned is defined using a
<span> within the body of the HTML. To identify this span, the ID "
textus" is used
It is important to know that the values of Variables are available from the "callas_tmp/calsDocInfo.js" file, which is created during runtime.
The respective value for the "placetext" Variable is evaluated and set for the "
To define formatting of the text, the "style.css" has to be adjusted to your individual needs. In our sample, this css is located in the subfolder CSS of the Template.
To open the Template folder, just select the entry "Open folder with configuration files" in the Folder selection pop up menu in the "Edit Fixup" dialog of "Place content on page".
It is of course also possible to reference a specific font file within the Template folder. This ensures, that the selected font will be used also on other machines, where e.g. the font is not installed.
You can also define now the respective Font-Face (e.g. "Bold" or "Italic") within the CSS.
The positioning of text from created by this Template is controlled via the settings in the Fixup.