Ask Your Question
0

Convert hundreds of files to ODT - programatically [closed]

asked 2014-06-13 01:30:55 +0100

davidgraywright gravatar image

updated 2015-09-04 13:27:13 +0100

Alex Kemp gravatar image

LibreOffice 4.2.4 Mac OS X 10.7.5

I have a need to convert multiple files (may be 100+) to ODT format.

Ideally we would like to start soffice in headless and invisible mode and close it when done.

I was thinking that we should talk to soffice via a socket.

I am doing all this in C++ and was wondering are there any examples of this being done already. Is there a method on an interface that does the conversion for you or do I need to open a document and save it programatically. Currently we call soffice in headless, invisible mode and use the --convert-to parameter but this is slow and requires start up and shutdown time.

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-25 18:08:23.690267

2 Answers

Sort by » oldest newest most voted
0

answered 2014-06-17 01:19:17 +0100

davidgraywright gravatar image

After looking at the python unoconv, the Java and C++ samples from the LibreOffice SDK I finally got some documents converted in a proof of concept C++ program. However I am now failing on txt files with chinese characters in it. I can view the file on Mac OS X via Finder and TextEdit - why cannot LibreOffice just open it?

edit flag offensive delete link more

Comments

Please edit this response to indicate exactly what is failing e.g., link to a screenshot, example file, etc. Chinese can sometimes use different character encodings. There are a few related questions on this site regarding this type of issue.

oweng gravatar imageoweng ( 2014-06-20 08:01:39 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-13 01:30:55 +0100

Seen: 687 times

Last updated: Jun 17 '14