[svn] r6259 - trunk/tools/unoconv
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Thu Apr 10 12:09:20 CEST 2008
Author: dag
Date: 2008-04-10 11:09:20 +0100 (Thu, 10 Apr 2008)
New Revision: 6259
Modified:
trunk/tools/unoconv/README
trunk/tools/unoconv/unoconv
Log:
Updates
Modified: trunk/tools/unoconv/README
===================================================================
--- trunk/tools/unoconv/README 2008-04-10 10:01:15 UTC (rev 6258)
+++ trunk/tools/unoconv/README 2008-04-10 10:09:20 UTC (rev 6259)
@@ -4,14 +4,19 @@
unoconv uses the OpenOffice's UNO bindings for non-interactive conversion
of documents.
-unoconv tries to start an oofice instance that it then uses and
-destroys. However the success rate of starting and stopping this
-ooffice instance depends on some outside factors.
+unoconv tries to start an ooffice instance (if it cannot find a running one)
+that it then uses and destroys. However the success rate of starting and
+stopping this ooffice instance depends on some outside factors.
-You can always start an instance yourself at the default port 2002 and
-then use unoconv until you're finished using it and then stop it.
+Since there is no feedback mechanism to see if the newly started ooffice is
+in fact ready to communicate, we don't know exactly when we can use the UNO
+api. If ooffice is not ready, you may get a random error.
+However, you can always start an instance yourself at the default port 2002
+and then use unoconv until you're finished using it and then stop it.
+
unoconv --listener &
+ sleep 20
unoconv -b pdf *.odt
unoconv -b doc *.odt
unoconv -b html *.odt
@@ -22,6 +27,8 @@
way the conversion tasks are performed on a dedicated system instead
of on the client system.
+Remember that ooffice requires an X display, even when using it in headless
+mode (not sure what -headless means in this context though).
Other tools that are useful or similar in operation:
Modified: trunk/tools/unoconv/unoconv
===================================================================
--- trunk/tools/unoconv/unoconv 2008-04-10 10:01:15 UTC (rev 6258)
+++ trunk/tools/unoconv/unoconv 2008-04-10 10:09:20 UTC (rev 6259)
@@ -375,7 +375,7 @@
for bin in ('soffice.bin', 'soffice', ):
error(2, "Trying to launch our own listener using %s." % bin)
try:
- oopid = os.spawnvp(os.P_NOWAIT, bin, [bin, "-nologo", "-nodefault", "-accept=%s" % op.connection]);
+ oopid = os.spawnvp(os.P_NOWAIT, bin, [bin, "-nologo", "-nodefault", "-headless", "-accept=%s" % op.connection]);
time.sleep(1)
unocontext = resolver.resolve("uno:%s" % op.connection)
break
More information about the svn-commits
mailing list