Commit f96243ec authored by Tristan Cavelier's avatar Tristan Cavelier

convertFile: hack to force the use of wkhtmltopdf in some case

Force the use of wkhtmltopdf if:
- source format is html
- destination format is pdf
- conversion_kw is not empty
parent 69723e67
......@@ -119,6 +119,12 @@ class Manager(object):
try:
self.kw['zip'] = zip
self.kw['refresh'] = refresh
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
else:
handler_class = getHandlerClass(source_format,
destination_format,
self.mimetype_registry,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment