I have successfully created a .docx document using docxtemplater like this:
try {
doc.render();
} catch (error) {
errorHandler(error);
}
const contentBuffer = doc.getZip().generate({ type: "nodebuffer" });
Is there a way to convert that contentBuffer to a pdf document?