docx to pdf with Node.js

udiko

udiko

Posted on April 28, 2022

docx to pdf with Node.js

Most of the npms didnt works for me but this one do the job:

npm i convert-multiple-files

convert.ts:

import { convertWordFiles } from 'convert-multiple-files';

const docToPdf = async (filePath: string, outputDir: string): Promise<string> => await convertWordFiles(filePath, 'pdf', outputDir);

export {
    docToPdf
};

Enter fullscreen mode Exit fullscreen mode

const outputFile = await docToPdf('file.docx', './outFolder');

💖 💪 🙅 🚩
udiko
udiko

Posted on April 28, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

docx to pdf with Node.js
node docx to pdf with Node.js

April 28, 2022