3 ms·
We used node-html-pdf[1] for this, but it depends on phantomjs which uses an ancient version of webkit. We migrated to electron and its contents.printToPDF(opti
by 0XAFFE 9y ago
We used node-html-pdf[1] for this, but it depends on phantomjs which uses an ancient version of webkit. We migrated to electron and its contents.printToPDF(options, callback), but that has the drawback that we have to start a X-server[2] with our backend code. I have hopes with a headless chrome we can ditch the xvfb-server and have one less dependencies. The setup is a pain, but the results are very good and looking very decent.
[1] https://github.com/marcbachmann/node-html-pdf https://github.com/marcbachmann/node-html-pdf
[2] https://en.wikipedia.org/wiki/Xvfb https://en.wikipedia.org/wiki/Xvfb