4 ms·
We have built something similar internally. Macroservice running a cluster of headless Chromes that turn an uploaded HTML file into a PDF. Used for reporting.
by cygned 8y ago
We have built something similar internally. Macroservice running a cluster of headless Chromes that turn an uploaded HTML file into a PDF. Used for reporting.
We now switch to a Microsoft Word rendering backend where we process Word files with template strings in them and then run Word in headless mode to save files as PDFs. While the HTML-to-PDF approach works, most of our users work with Word all day so we are solving the wrong problem.
- wilsonfiifi 8y agoCan you elaborate a bit more on your Word based reporting? To date the only solution i've been satisfied with is Aspose Words. Unfortunately licensing is a bit steep so it would be good to know if any cheaper options are available.
- cygned 8y agoWe basically process the template with a node.js library. We then have a node.js server on a Windows machine that takes a file, saves it onto disk and runs a Visual Basic application on it which itself starts Microsoft Word headless to save the file as PDF.
- benbristow 8y ago> runs a Visual Basic application on it Clever, but that does sound a bit messy.
- cygned 8y agoSounds messy. However, this VB app is literally just 15 LOC, pretty straightforward. And it is the only solution we have found so far that allows us to leverage Word.