Using javascript
, I need to create an .odt
file and populate the contents with data in javascript
variables. The only thing that I have found that might work is WebODF
. An example that seems similar to it is here.
When I am trying to do something similar to PDF
with pdfkit
(using node) I can do something like this:
PDFDocument = require('pdfkit');
var doc = new PDFDocument();
doc.pipe(fs.createWriteStream(fileName));
doc.text("Fist line");
doc.text("Second line");
Is it possible to do something similar to it using WebODF
? I've found ops.OpInsertText, but I'm not sure how I can use it to actually insert text.
Again, ideally the solution is only in javascript
.