Skip to content

Commit

Permalink
Fix PDF import with libreoffice (ether#4156)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunob authored Jul 9, 2020
1 parent 358af5f commit 3ea8d57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/node/utils/LibreOffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ exports.convertFile = function(srcFile, destFile, type, callback) {
if (type === "html") {
// "html:XHTML Writer File:UTF8" does a better job than normal html exports
type = "html:XHTML Writer File:UTF8";
// PDF files need to be converted with LO Draw ref https://github.com/ether/etherpad-lite/issues/4151
if (path.extname(srcFile).toLowerCase() === ".pdf") {
type = "html:XHTML Draw File"
}
}

// soffice can't convert from html to doc directly (verified with LO 5 and 6)
Expand Down

0 comments on commit 3ea8d57

Please sign in to comment.