Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49258

How to convert a word document to odt Ionic 4

$
0
0

@ionian wrote:

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.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49258

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>