Hi, i am working on an Ionic 4 project. I am trying to convert a word document to a odt(OpenOffice) document. I searched which package can suit me. I found those two: https://www.npmjs.com/package/asciidoctor-converter-opendocument https://www.npmjs.com/package/cnx-designer-convert-odt
but they are not well documented. Then i found this: https://www.npmjs.com/package/simple-pandoc I am trying to implement the code: const pandoc = require(‘simple-pandoc’); const wordToOdt = pandoc(‘docx’, ‘odt’);
var fs=require(“fs”); wordToOdt(fs.readFileSync(‘assets/ICEVI News.docx’)).then(md => {
console.log(md.toString()); });
However , i am getting : fs.readFileSync is not a function I was wondering if you could help me ,please? Do you have maybe other suggestions/packages to achieve the desired functionality,please? Thank you in advance.