mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-17 11:44:51 -04:00
partially revert: bugfix/import: doc import bugfix (#4235)
This commit is contained in:
parent
2d01f4cd8b
commit
2e48b88e70
1 changed files with 3 additions and 5 deletions
|
@ -43,9 +43,8 @@ exports.convertFile = function(srcFile, destFile, type, callback) {
|
||||||
|
|
||||||
if (type === "html") {
|
if (type === "html") {
|
||||||
// "html:XHTML Writer File:UTF8" does a better job than normal html exports
|
// "html:XHTML Writer File:UTF8" does a better job than normal html exports
|
||||||
if (path.extname(srcFile).toLowerCase() === ".doc") {
|
type = "html:XHTML Writer File:UTF8"
|
||||||
type = "html";
|
|
||||||
}
|
|
||||||
// PDF files need to be converted with LO Draw ref https://github.com/ether/etherpad-lite/issues/4151
|
// PDF files need to be converted with LO Draw ref https://github.com/ether/etherpad-lite/issues/4151
|
||||||
if (path.extname(srcFile).toLowerCase() === ".pdf") {
|
if (path.extname(srcFile).toLowerCase() === ".pdf") {
|
||||||
type = "html:XHTML Draw File"
|
type = "html:XHTML Draw File"
|
||||||
|
@ -85,8 +84,7 @@ function doConvertTask(task, callback) {
|
||||||
'--nologo',
|
'--nologo',
|
||||||
'--nolockcheck',
|
'--nolockcheck',
|
||||||
'--writer',
|
'--writer',
|
||||||
'--convert-to',
|
'--convert-to', task.type,
|
||||||
`${task.type}:XHTML Writer File:UTF8`,
|
|
||||||
task.srcFile,
|
task.srcFile,
|
||||||
'--outdir', tmpDir
|
'--outdir', tmpDir
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue