odt

HTML to ODT – XSLT?

拥有回忆 提交于 2021-01-29 13:41:58
问题 I'm trying to convert single pieces of HTML code to the XML Format the *.odt format (Open Office) is using. For example, <p>This is some text</p> should be translated to <text:p>This is some text</text:p> . Of course, this should also work with lists etc. I'm not sure whether the best way to go would be using a XSLT processor (and if so, which one for Java?) and create the stylesheet myself – isn't there a Java library out there that can already do this? I'm using jodconverter to go from ODT-

XSL change structure of ODT XML file

╄→尐↘猪︶ㄣ 提交于 2020-08-10 03:38:06
问题 I am trying to convert an fodt file into a different structure using XSLT. I have the following xml (extracted from an fodt file) <office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"> <office:blablaTags> officeblabla </office:blablaTags> <office:body> <office:text text:use-soft-page-breaks="true"> <text:variable-decls> officeBlabla </text

openoffice: duplicating rows of a table in writer

北战南征 提交于 2020-01-14 03:26:05
问题 I need to programmatically duplicate rows of a Table in openoffice writer. It's not difficult to add rows via table.Rows.insertByIndex(idx, count) , that adds empty rows and it's easy to add text in that row assigning DataArray to the CellRange . Doing this way you loose control on the style of the cells and specifically if a cell has words with different style (bold/italic) they get flattened to the same face. What I need is to duplicate a row in a way that preserves the style of each word

Add styling rules in pandoc tables for odt/docx output (table borders)

守給你的承諾、 提交于 2019-12-29 18:25:16
问题 I'm generating some odt/docx reports via markdown using knitr and pandoc and am now wondering how you'd go about formating tables. Primarily I'm interested in adding rules (at least top, bottom and one below the header, but being able to add arbitrary ones inside the table would be nice too). Running the following example from the pandoc documentation through pandoc (without any special parameters) just yields a "plain" table without any kind of rules/colours/guides (in either -t odt or -t

Add styling rules in pandoc tables for odt/docx output (table borders)

丶灬走出姿态 提交于 2019-12-29 18:25:14
问题 I'm generating some odt/docx reports via markdown using knitr and pandoc and am now wondering how you'd go about formating tables. Primarily I'm interested in adding rules (at least top, bottom and one below the header, but being able to add arbitrary ones inside the table would be nice too). Running the following example from the pandoc documentation through pandoc (without any special parameters) just yields a "plain" table without any kind of rules/colours/guides (in either -t odt or -t

How can I generate Byte array from an ODT file java

穿精又带淫゛_ 提交于 2019-12-25 13:15:34
问题 I am trying to generate a PDF from an ODT template file which contain the fields i need to populate. I wanted to get the byte array of this ODT template which is present in the root folder of my project. My application is in such a way that the byte array is provided to generate the PDF. Is there any specific method to generate the byte array without losing the properties of the template..? 回答1: Try this may help you : URL url = this.getClass().getResource("/your_file"); File templateFile =

Django create .odt or .docx documents to download

喜欢而已 提交于 2019-12-21 20:24:42
问题 I need to generate either .odt or .docx files based on the information I have in my database. Let's say I have a model: class Contact(models.Model): first_name = models.CharField() last_name = models.CharField() email = models.EmailField() I want that users are able to generate office document that contains that information and also some other text. I took a look for this example which is using python-docx and it gives me an idea how to generate that document. But I can't figure out where

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