Hi, I'm trying to get the following sample code running
var http = require('http'),
wkhtml = require('node-wkhtml');
http.createServer(function (request, response) {
var pdf = wkhtml.spawn('pdf');
pdf.stdout.pipe(response);
pdf.stdin.end('<h1>Hello World</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', 'utf-8');
}).listen(8000);
But I keep getting the following error:
Uncaught exception : Error: write EPIPE
at errnoException (net.js:769:11)
at Object.afterWrite (net.js:593:19)
I'm running it on Node v0.8.11.
Anyone else having troubles with piping to the response?
Well, this is embarrassing, I didn't have the executable properly set up.
So if anyone encounters this problem setup you wkthml executables so they are available to the path! :)
Hi, I'm trying to get the following sample code running
But I keep getting the following error:
I'm running it on Node v0.8.11.
Anyone else having troubles with piping to the response?
Tim.