Common List Image in HTML Document

Note
In this article, we will use GroupDocs.Assembly to generate a Common List report in HTML Document format.
Note
The example reads the shop data described in The Business Layer.

Common List in HTML Document

Reporting Requirement

As a report developer, you are required to share the following key requirements:

  • A report must show multiple customers’ picture and name.
  • A report must be generated in the HTML Document format.

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

common-list-image-word-processing-document

Download Common List Template

Please download the sample Common List document we created in this article:

Generating The Report

import json

from groupdocs.assembly import DataSourceInfo, DocumentAssembler

with open("customers.json", encoding="utf-8") as f:
    customers = json.load(f)

assembler = DocumentAssembler()
assembler.assemble_document("common-list.html", "common-list-report.html", DataSourceInfo(customers, "customers"))

The following sample file is used in this example: common-list.html

The following sample file is used in this example: customers.json

The following sample files are used in this example: quayside-bistro.png, lantern-street-cafe.png, saltmarsh-deli.png, pier-nine-kitchen.png

<html>
<body>

<img height="100" width="100" src="data:image/jpeg;base64,quayside-bistro.png"/>
<h2>Quayside Bistro</h2>

<img height="100" width="100" src="data:image/jpeg;base64,lantern-street-cafe.png"/>
<h2>Lantern Street Café</h2>

<img height="100" width="100" src="data:image/jpeg;base64,saltmarsh-deli.png"/>
[TRUNCATED]

Download full output

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.