webodf

Webodf display odf from bytes

浪尽此生 提交于 2019-12-13 18:20:01
问题 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 like something like odfcanvas.loadFromBytes(bytes); 回答1: Yes, It is possible to read an odt file from byte Array and then load it in webodf editor. To do so ,you will have to use javascript blob objects to construct a file from a byte array(desired file

How to read XML file using FileReader javascript?

我与影子孤独终老i 提交于 2019-12-01 23:08:04
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 FileReader() reader.onloadend=function(e){ var data = e.target.result; //data is not in xml format var xml = str2xml(data); //getting error /* using DOM parser for xml parsing */ } reader.readAsBinaryString(file); How can get XML from ODF file using javascript FileReader? Here's a browser-based example, but this should be applicable to other JavaScript contexts: Make a

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

眉间皱痕 提交于 2019-12-01 11:53:43
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 downloads will be stored/expected in: /home/peoplelink/build/downloads -- Installed Node.js found: /usr/bin/nodejs - 0.10.25 -- good Node.js found: 0.10.25 (0.10.5 required.) -- npm found: /usr/bin/npm -- Android was not found: APK will not be built. JS file dependencies were updated. -- Configuring done -- Generating done -- Build files have been

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

馋奶兔 提交于 2019-12-01 09:56:05
问题 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 downloads will be stored/expected in: /home/peoplelink/build/downloads -- Installed Node.js found: /usr/bin/nodejs - 0.10.25 -- good Node.js found: 0.10.25 (0.10.5 required.) -- npm found: /usr/bin/npm -- Android was not found: APK will not be built.

How to read XML file using FileReader javascript?

社会主义新天地 提交于 2019-11-28 09:12:12
问题 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 FileReader() reader.onloadend=function(e){ var data = e.target.result; //data is not in xml format var xml = str2xml(data); //getting error /* using DOM parser for xml parsing */ } reader.readAsBinaryString(file); How can get XML from ODF file using javascript FileReader?