I'm running a node server and wanted to add some icons to a dynamically created PDF using PDFkit - so I installed fontawesome npm install fontawesome
and required it in the .js file creating the pdf var fa = require('fontawesome');
I then tried to use the icons with PDFKit:
doc.fontSize(40).fill('black').text(fa('bath'), 160, 80);
But, I don't see a bath
icon - just two jibberish symbols in its place.
What do I have to do to render the fa icons? This is a server-side script without a front end, and is run using a cron that pings a oracle view for dynamic information as part of a daily email. (So, I'm not using any css or html to create the document)
Thanks for your help!