Hi,

I want to run wkhtmltopdf as a child_process on an Ubuntu system. I want to 
use stdin and stdout of the child_process. I use the following script for 
running the cp:

var cp = require('child_process');

var streams = cp.spawn('wkhtmltopdf', ['-q', '-', '-'])

streams.stdout.on('data', function(data) { console.log(data.toString()) });
streams.stderr.on('data', function(data) { console.log(data.toString()) });

streams.on('exit', function(code) {
    console.log('exit', code);
});

streams.stdin.end('Hello World', 'utf8');

wkhtmltopdf can be downloaded 
from http://code.google.com/p/wkhtmltopdf/downloads/list. I used the static 
build.

This script is working on Mac OS X 10.8 with node 0.6.21 and 0.8.5 without 
problems. On Ubuntu the script is working with node 0.6.x but not with 
0.8.x. I tested this with Ubuntu 10.04 32bit and 11.10 64bit. wkhtmltopdf 
says that the destination is not writable. Are there any important changes 
made in 0.8.x which I need to know to get the script running?

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to