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

Error: write EPIPE #112

Open
royalwood opened this issue Nov 30, 2017 · 7 comments
Open

Error: write EPIPE #112

royalwood opened this issue Nov 30, 2017 · 7 comments

Comments

@royalwood
Copy link

royalwood commented Nov 30, 2017

var rendered = "Test";
wkhtmltopdf(rendered, {
output: 'rendered.pdf',
pageSize: 'A4'
});
then raise error like as below:

Error: write EPIPE
at exports._errnoException (util.js:1020:11)
at WriteWrap.afterWrite (net.js:800:14)

@ricksturgeon
Copy link

I have the same issue, tried several node versions now running node 8.9.1 with this error:Error: "write EPIPE
at _errnoException (util.js:1024:11)
at WriteWrap.afterWrite [as oncomplete] (net.js:867:14)"
Code worked a year ago but either mac os or node is causing the wkhtmltopdf to fail, please help :) . Rick

@ricksturgeon
Copy link

Solved: The error is caused when you have not installed the command line version of wkhtmltopdf since this is just a wrapper. Simple error showed up when I turned on debug. Hope this is your issue above as well.

Rick

@crachuy-mdsol
Copy link

crachuy-mdsol commented Jan 9, 2018

I got this when mishandling the resulting stream, even with wkhtmltopdf installed. It worked to save and send a file instead.

@NodeUrsa If that's your complete snippet, you may just need to send the PDF file you've created. You could also first verify it is in present on disk. You can try something like const path = require('path') and res.sendFile(path.resolve('rendered.pdf'))

@rahrang
Copy link

rahrang commented Mar 14, 2019

i had the same problem. fixed it with @ricksturgeon's advice, downloading the command line version from https://wkhtmltopdf.org/downloads.html#stable.

@bouchja1
Copy link

bouchja1 commented Aug 21, 2019

You will get this error also if you are using wkhtmltopdf v0.13 alpha with this JavaScript wrapper.

@krushndayshmookh
Copy link

i had the same problem. fixed it with @ricksturgeon's advice, downloading the command line version from https://wkhtmltopdf.org/downloads.html#stable.

thanks

@prabhurajshell
Copy link

Still facing this on Mac. Command Line version is downloaded. - wkhtmltopdf 0.12.6 (with patched qt)

Any ideas on how to resolve this?

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

7 participants