Insert images into the Picture Content Control |
Scroll |
Images can be inserted into a Picture Content Control. Because there is no index data type in Thereforeā¢ that can hold images it needs to be provided as a string.
The pictures should be base64 encoded and contain format information, similar to the HTML/CSS format.
This is a cut example of an image encoded that way:
data:image/png;base64,iVBORw0KGgoAA
Common image types like PNG, JPEG, GIF, BMP, and TIF are supported.
In the assignments, an image could either be provided via scripting or as a static string ā see "Pic1" or directly as text "Pic2".
For loading an image file from a disk using scripting, a FileSystemObject is required. This object can only be created with the safe mode turned off.
Images can be assigned to the Body, as well as the Header and Footer of the document.
The image will fill the Content Control without changing its' aspect ratio.
Unused space in the Content Control will be removed:
Blue Arrow:
The rotated Thereforeā¢ logo was shrunk, so it does not exceed the height of the Content Control.
The width of the Content Control was reduced to fit the width of the image.
Green Arrow:
The Thereforeā¢ logo was slightly enlarged to fill the width of the Content Control.
The height of the Content Control was reduced to fit the height of the image.
A sample configuration as well as barcode sample files can be downloaded here:
https://extranet.therefore.net/downloads/sales-technical-info/?t=65&f=5367