'Creation of custom contracts on the server? Converting DOCX to PDF in Nodejs

this kind of question has already been asked here, but I found no satisfactory answers. They either require libre office to be installed on the system or to use third party API's.

Our usecase is that we generate contracts for each user, the issue is that PDF's are hard to replace placeholder values, so we are doing that with a .docx file but for printing and integrity of the layout we'd like to have them be PDF's after they've been populated with the correct data.

What would be the best approach here, should we scrap .docx template entirely and try and go with the PDF's from the start? Should we deploy our own API for converting the docs?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source