Ask Your Question

Reading from Writer using Uno (and Python) [closed]

asked 2013-04-12 00:14:50 +0100

_savage gravatar image

I hope somebody has an answer to this question. Given a loaded document

local = uno.getComponentContext()
resolver = local.ServiceManager.createInstanceWithContext("", local)
context = resolver.resolve("uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext")
desktop = context.ServiceManager.createInstanceWithContext("", context)
document = desktop.loadComponentFromURL("file:///Users/savage/test.odt" ,"_blank", 0, ())

How do I now actually read text from the document, preferably including some of the styling information like headings, or footnotes?


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-23 02:14:04.264008

1 Answer

Sort by » oldest newest most voted

answered 2014-05-17 12:21:24 +0100

jonathan.scholbach gravatar image

I don't know how it works with Uno but for reading (and parsing) an odt-file with Python have a look at this: Extract and Parse ODF Files with Python

edit flag offensive delete link more

Question Tools


Asked: 2013-04-12 00:14:50 +0100

Seen: 1,161 times

Last updated: May 17 '14