Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
46ad228b
Commit
46ad228b
authored
Dec 18, 2015
by
LE GAC Renaud
Browse files
Fix to run libreoffice convert in the server side.
parent
176bb0f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
views/lists/index.odt
views/lists/index.odt
+13
-2
No files found.
views/lists/index.odt
View file @
46ad228b
...
...
@@ -36,10 +36,21 @@
#
# convert the HTML in ODT file
# the command Xvbf is available only in the server
# not in the development area
#
fi_tmp = TemporaryFile()
cmd = ["libreoffice", "--headless", "--convert-to", "odt", fhtml]
call(cmd, stdout=fi_tmp)
if os.path.exists('/usr/bin/Xvfb'):
cmd = "Xvbf :1 -screen 0 800x600x8 & "
cmd += "libreoffice --nologo --headless --invisible --display :1.0 --convert-to odt "
cmd += fhtml
call(cmd, stdout=fi_tmp, shell=True)
else:
cmd = ["libreoffice", "--headless", "--convert-to", "odt", fhtml]
call(cmd, stdout=fi_tmp)
fodt = '%s.odt' % froot
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment