Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line pdftotext works fine, not so pdf-text-extract for same pdf file #30

Open
markbobick opened this issue Dec 12, 2017 · 0 comments

Comments

@markbobick
Copy link

OS is fedora 20
using a file with "good provenance" "https://www.edge.org/documents/life/Life.pdf" as test for code:
(wget the file without issue)
...
var pdfToTextCommand = '/usr/bin/pdftotext';
var extract = require('pdf-text-extract');
...
extract(filePath, { splitPages: false, eol: "unix" }, pdfToTextCommand, function (err, text) {
if (err) {
var message = { message: err + " could not convert requested PDF file to text" };
console.log(JSON.stringify(message));
res.json(message);
}
console.log(text);

result:
"Error: pdf-text-extract command failed: Syntax Warning: May not be a PDF file (continuing anyway)\nSyntax Error: Couldn't find trailer dictionary\nSyntax Error: Couldn't read xref table\n

all files from any source I've attempted have same issue. performed the stare and compare. do not see error. using command line pdftotext works great. where is my error? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant