Committed by
Bjoern Meyer on Friday, February 15, 2019

Merging Images into Image Placeholders

Merging images is a very simple task using the Text Control ReportingCloud Web API. Using the online template editor, you can add image placeholders into your template document. These placeholders can be bound to values in your JSON data source.

Creating a Template with Image Placeholders

In order to create a template with an image placeholder, follow these simple steps:

  1. The JSON data must contain the image binary data encoded as a Base64 string. The image can be of type JPG, PNG, BMP and GIF. In your ReportingCloud Portal, click on My Datasource Excerpts and create a new datasource excerpts file by pasting the following JSON into the Datasource Excerpt text box:

    Confirm the creation with Create Excerpt.

  2. Click on My Templates and create a new template by clicking New Template. Type in a document name, select your preferred document format such as DOCX and confirm with OK.

  3. Confirm the next dialog with Edit Template and select the created JSON excerpt file created in step 1 using the Select datasource excerpt file drop-down box. Open the template editor by clicking Edit Template:

  4. Choose Image Placeholder from the Image drop-down from the Insert ribbon tab:

  5. Right-click the image and open the Select Object Data Source drop-down box. Select Master -> image as the data source to bind the placeholder to the data column in the excerpt file.

  6. Click Preview Merge Fields in the Reports ribbon tab and confirm the opened dialog box with OK:

When merging your template with JSON data using the Web API, the image data must be provided in the same way like in the excerpt file.

    Found a in our documentation?

    Edit this page on GitHub