You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a space in the value for filePath, then it can't extract from a Rich Text Format file:
var textract = require('textract');
var path = require('path')
, fs = require("fs")
;
var config = {};
config.preserveLineBreaks = true;
var processText = function (error, text) {
console.log(text);
};
var filePath = "Example filename.rtf";
// Works if the following is used
// var filePath = "ExampleFilename.rtf";
textract.fromFileWithPath(filePath, config, processText);
// Also works if the following is used
// var textBuff = fs.readFileSync(filePath);
// textract.fromBufferWithName(filePath, textBuff, config, processText);
However, if the filePath is changed to not have a space in it, or if fromBufferWithName is used, it works fine.
This is using the 2.0.0 release of textract.
The text was updated successfully, but these errors were encountered:
If there is a space in the value for
filePath
, then it can't extract from a Rich Text Format file:However, if the filePath is changed to not have a space in it, or if
fromBufferWithName
is used, it works fine.This is using the 2.0.0 release of textract.
The text was updated successfully, but these errors were encountered: