Employee achievement | Tejpal Borkar
The main issue was to convert the HTML pages to PDF format. We had done this before, so it seemed easy at first using traditional methods. But soon, we realized that they were not enough to get the required precise results. Now we had two options – do it the old way and produce an inefficient result, or to search for a new way to do it better.
I knew the former could not be an option, so started focusing on finding a new approach. I found a way to generate a pdf report from the react libraries using a browser application. Identification of that library was a great start. However, it was required was to generate the reports in the backend. It was not possible to use a solution that requires user interaction. I knew I can launch a browser from NodeJS in a separate session. Wow, it worked like a charm.
Once the core problem of conversion to PDF was resolved, the rest was easy. We implemented separate APIs in the backend to gather the data. REST services with Spring-boot, Java, and Microservices were some easy work.
The product has a scheduler built it. Using the scheduler it was possible to configure the frequency of the reports such as DAILY, MONTHLY, or WEEKLY, or it could also trigger a new report based on a threshold anytime.