Commits (4)
  • Arnaud Fontaine's avatar
    CUSTOM: OpenOffice 3.1.1 sometimes SIGSEGV on Debian stable. · 231b949b
    Arnaud Fontaine authored
    On customer environment at startup when trying to get the list of filters and
    Cloudooo ends up being not reachable at all, so implement retry for such cases.
    0  0x00007ffff5ab6265 in uno_getIdOfCurrentThread () from /opt/openoffice.org3/basis-link/program/../ure-link/lib/libuno_cppu.so.3
    1  0x00007ffff071c20c in ?? () from /opt/openoffice.org/ure/lib/liburp_uno.so
    2  0x00007ffff0725775 in ?? () from /opt/openoffice.org/ure/lib/liburp_uno.so
    3  0x00007ffff0725898 in ?? () from /opt/openoffice.org/ure/lib/liburp_uno.so
    4  0x00007ffff0715f2a in ?? () from /opt/openoffice.org/ure/lib/liburp_uno.so
    5  0x00007ffff5405c18 in ?? () from /opt/openoffice.org3/basis-link/program/../ure-link/lib/libuno_sal.so.3
    6  0x00007ffff781a0a4 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
    7  0x00007ffff6e4704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
  • Arnaud Fontaine's avatar
    BACKPORT/CUSTOM: Backport wkhtmltopdf handler from origin/master (cd3ec5a5). · 637595ec
    Arnaud Fontaine authored
    Using latest origin/master does not work with our (very old) SR: cloudooo
    is stucked at startup for unknown reason. Anyhow, wkhtmltopdf is a distinct
    handler separated from OOo so this avoid too much change...
  • Arnaud Fontaine's avatar
  • Arnaud Fontaine's avatar
......@@ -119,10 +119,17 @@ class MimeMapper(object):
"--hostname=%s" % hostname,
"--port=%s" % port]
process = Popen(command, stdout=PIPE, stderr=STDOUT, close_fds=True)
stdout, stderr = process.communicate()
if process.returncode:
import time
for _ in range(20):
process = Popen(command, stdout=PIPE, stderr=STDOUT, close_fds=True)
stdout, stderr = process.communicate()
if process.returncode == 0:
raise ValueError(stdout)
filter_dict, type_dict = json.loads(stdout)
ooo_disable_filter_name_list = kw.get("ooo_disable_filter_name_list") or [] + [
This diff is collapsed.
......@@ -73,7 +73,7 @@ class Manager(object):
self.handler_dict = self.kw.pop("handler_dict")
def convertFile(self, file, source_format, destination_format, zip=False,
refresh=False, conversion_kw={}):
"""Returns the converted file in the given format.
Keywords arguments:
file -- File as string in base64
......@@ -84,7 +84,21 @@ class Manager(object):
self.kw['zip'] = zip
self.kw['refresh'] = refresh
handler_class = getHandlerClass(source_format,
# XXX Force the use of wkhtmltopdf handler if converting from html to pdf
# with conversion parameters.
# This is a hack that quickly enables the use of wkhtmltopdf without
# conflicting with other "html to pdf" conversion method
# (i.e. using the ooo handler) that does not use such a parameter.
# This hack should be removed after defining and implementing a way to
# use the conversion_kw in a possible interoperable way between all
# "html to pdf" handlers.
if (conversion_kw and
source_format in ("html", "text/html") and
destination_format in ("pdf", "application/pdf")):
from cloudooo.handler.wkhtmltopdf.handler import Handler as WkhtmltopdfHandler
handler_class = WkhtmltopdfHandler
handler_class = getHandlerClass(source_format,
......@@ -92,7 +106,7 @@ class Manager(object):
decode_data = handler.convert(destination_format)
decode_data = handler.convert(destination_format, **conversion_kw)
return encodestring(decode_data)
def updateFileMetadata(self, file, source_format, metadata_dict):