Closed Lujaw closed 10 years ago
Do you have all the required dependencies installed?
This sounds like the same issue I have experienced on OS X. I got the same error on timeout.
I have modified the split.js file from:
walker.on('file', function(root, stat, next) {
if (stat.name.match(/\.pdf$/i)) {
var file_path = path.join(directory_path, stat.name);
file_paths.push({file_path: file_path, file_name: stat.name});
next();
}
});
to
walker.on('file', function(root, stat, next) {
if (stat.name.match(/\.pdf$/i)) {
var file_path = path.join(directory_path, stat.name);
file_paths.push({file_path: file_path, file_name: stat.name});
}
next();
});
and now the tests pass. The trouble seems to be that doc_data_path is set to current folder while the file is actually placed in the temporary output folder by pdftk. This means that remove_doc_data fails to remove the file and in turn that the walker code chokes on the file as it only expects pdf-files.
good catch @alexscheelmeyer. Care to open a pull request with your fix?
Should be fixed in latest version 1.0.6
published to npm. Please send feedback if other issues occur
7 tests are failing when running the npm test. Most of them are due to "Error: timeout of 100000ms exceeded" Have tried increasing the timeout value but that doesn't help too ..