Questions tagged [webodf]

WebODF is a javascript library to open and edit open document format files.

It provides an API to modify and format documents online in a browser using a Javascript API built on top of basic Javascript DOM editing and modifications. The library supports .odt, .ods, .odp among many other file formats. Also saving of files with custom fonts and styles for elements, image addition are some of the key features.

Basic usage is as follows:

<html>
<head>

//Include the webodf library..
//Use webodf-debug.js(unminified) if you want to debug the webODF Api on your own..
<script src="webodf.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">

  function init() {
    var odfelement = document.getElementById("odf"),
    //globally exposed 'odf' object by webodf library
    odfcanvas = new odf.OdfCanvas(odfelement);
    // Load your Open Document Format File ..The file should be located on server and accessible using a valid path e.g : ../resources/docs/myodt.odt
    odfcanvas.load("myfile.odt");
  }

  window.setTimeout(init, 0);

</script>
</head>

<body>
  <div id="odf"></div>
</body>

</html>

The Source code for webodf can be found on github page here.

12 questions
3
votes
0 answers

Document editor in angular2?

Is there any document editor component in angular2 .I find webodf document editor in angular. but I have not seen any document editor in angular2 kindly suggest me some document editor component available in angular2 or any other way to do this.
goku
  • 223
  • 2
  • 12
3
votes
2 answers

Dynamically creating ODT using WebODF / Javascript

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…
Joshua I. James
  • 143
  • 1
  • 8
3
votes
1 answer

Testing WebOdf Collaborative editor on localServer

I am trying to add document editor support in my website. I found Opensource WebODF and tried to test it on my local server. The git repository ReadMe gives instructions on how to add Odf viewer support. I was able to test the localeditor. Can some…
user3296385
  • 121
  • 1
  • 4
3
votes
2 answers

How to read XML file using FileReader javascript?

I need to get XML from a ODF file. I tried using FileReader readAsText and readAsBinaryString but its not working. FileReader readAsText returns some special characters for odf files. with readAsBinaryString var reader = new…
kongaraju
  • 9,344
  • 11
  • 55
  • 78
2
votes
1 answer

How to convert DOCX to ODT format using javascript?

I am working on a in-website document editor(word and excel document). So far I am able to edit ODT files using WEBODF. Is there any way to convert DOCX file to ODT using javascript so that i can use the file in the editor? any alternatives for…
Ankur Choudhury
  • 189
  • 2
  • 13
2
votes
2 answers

Editing `ods` file in C++ code

I need to edit LibreOffice Calc document programmatically in C++. I know that there is odfkit library, which uses webodf, but it looks like it doesn't support editing .ods files. Is there any alternative that can deliver me this feature?
Krzysztof Stanisławek
  • 1,267
  • 4
  • 13
  • 27
1
vote
1 answer

how to use the webodf editor in localhost with node.js

I did not find any tutorials to how to run the webodf i read his apis and source code i am getting how to start it can anybody share the idea. - WebODF version 0.5.10-8-gf5949f3 -- Found Java: /usr/bin/java (found version "1.7.0.91") -- external…
MISY
  • 39
  • 6
1
vote
2 answers

Webodf display odf from bytes

Is it possible for webodf to read a odf / odt file from its bytes? instead of an url? Currently using: var odfelement = document.getElementById("odf"); var odfcanvas = new odf.OdfCanvas(odfelement); odfcanvas.load("url/to/file.odt"); and would…
cipriota
  • 11
  • 3
0
votes
1 answer

WebODF simple file open

I'm trying to make a simple file viewing with WebODF in javascript. My code looks like this: