How to convert a .docx document (nodebuffer) to a pdf

Viewed 16

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?

1 Answers
Related