Back to projects
Aug 31, 2024

Print Service

The Game Changer in Report Templating

Background

More client number that mean more report template we need to create. We created a report templates in HTML format. This method was very easy to implement, but inflict many problems. The first problem was the frontend tasks would be postponed while creating the report templates and addressing minor mismatch such as table padding and page margins. The second issue was the reports could not be downloaded through mobile application and the report file sizes were excessively big.

Implementation

We used excel to define report template and we need to fill the given template with appropriate data. So we decided to use Exelize, Aymeric/Raymond as templater, and Libreoffice as excel to pdf converter.

Obstacles

There were many obstacles we faced on:

  • Exelize cannot place the given image to proper position If we added an image beneath dynamic content, such as a table, the image would remain in the same position where it was placed causing overlap between the table and the image. To resolve this issue, we added a unique identifier as a string.

  • We cannot add dynamic header and footer There was no way to change header and footer value using Exelize.

  • The template could not contain background image Since we use Libreoffice as excel to pdf converter, we are unable to add background image to excel file. The best we can do is insert background image as an image and reduce image opacity. However, this method only applies the background image to the first page