LibreOffice: use "html:XHTML Writer File:UTF8" export method

This yields better conversion results, but requires the previous change,
otherwise there would have been difficulties in locating the temporary file
name.
This commit is contained in:
John McLear 2020-03-29 12:09:08 +00:00 committed by muxator
parent b2ccd0a191
commit 08b83ae358

View file

@ -41,6 +41,11 @@ exports.convertFile = function(srcFile, destFile, type, callback) {
// Used for the moving of the file, not the conversion
var fileExtension = type;
if (type === "html") {
// "html:XHTML Writer File:UTF8" does a better job than normal html exports
type = "html:XHTML Writer File:UTF8";
}
// soffice can't convert from html to doc directly (verified with LO 5 and 6)
// we need to convert to odt first, then to doc
// to avoid `Error: no export filter for /tmp/xxxx.doc` error