We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description of the error in console /repo/node_modules/gm/lib/command.js:318 err = new Error('Command failed: ' + stderr); ^
Error: Command failed: gm convert: Improper image header (/var/folders/cs/l780tq_j2f70ml2j7qxzyp3w0000gp/T/gmCFO1v4). at ChildProcess.onExit (/repo/node_modules/gm/lib/command.js:318:17) at ChildProcess.emit (node:events:520:28) at maybeClose (node:internal/child_process:1105:16) at Socket. (node:internal/child_process:457:11) at Socket.emit (node:events:520:28) at Pipe. (node:net:337:12) { code: 1, signal: null }
To Reproduce Steps to reproduce the behavior:
Versions:
Pdf I am trying to convert is very minimal 1 test page that I made from Word and is not protected! Please help! No idea what I am doing wrong!
========== My code: const options = { saveFilename: "untitled", savePath: "./images", }; const convert = fromPath(filePath, options); const pageToConvertAsImage = 1;
convert(pageToConvertAsImage, { responseType: "image" }) .then((resolve) => { console.log("Page 1 is now converted as image"); return resolve; });
The text was updated successfully, but these errors were encountered:
Hi @lukaprijatelj, can you try your code with another PDF? Maybe pdf1 from this repository https://github.com/yakovmeister/pdf2image/blob/master/test/data/pdf1.pdf
Sorry, something went wrong.
Nop. Same issue.
No branches or pull requests
Description of the error in console
/repo/node_modules/gm/lib/command.js:318
err = new Error('Command failed: ' + stderr);
^
Error: Command failed: gm convert: Improper image header (/var/folders/cs/l780tq_j2f70ml2j7qxzyp3w0000gp/T/gmCFO1v4).
at ChildProcess.onExit (/repo/node_modules/gm/lib/command.js:318:17)
at ChildProcess.emit (node:events:520:28)
at maybeClose (node:internal/child_process:1105:16)
at Socket. (node:internal/child_process:457:11)
at Socket.emit (node:events:520:28)
at Pipe. (node:net:337:12) {
code: 1,
signal: null
}
To Reproduce
Steps to reproduce the behavior:
Versions:
Pdf I am trying to convert is very minimal 1 test page that I made from Word and is not protected!
Please help! No idea what I am doing wrong!
========== My code:
const options =
{
saveFilename: "untitled",
savePath: "./images",
};
const convert = fromPath(filePath, options);
const pageToConvertAsImage = 1;
convert(pageToConvertAsImage, { responseType: "image" })
.then((resolve) => {
console.log("Page 1 is now converted as image");
return resolve;
});
The text was updated successfully, but these errors were encountered: