are you sure it's the end of the file? not the start? you're on 0.8.X, so
you might just loose some packages at start, because the stream is already
going on. a bug, that is fixed in 0.10. have you tried this:
var ws = fs.createWriteStream(filename, {encoding: 'binary'});
r.pipe(ws);
ws.on('close', function () {
// parse the PDF
});
r.on('error', function (err) { console.log(err) });
r.on('end', function () { console.log('end') });
r.on('close', function () { console.log('close') });
Am Montag, 13. Mai 2013 20:53:06 UTC+2 schrieb Matt Sergeant:
>
> On Mon, May 13, 2013 at 2:45 PM, mscdex <[email protected] <javascript:>>wrote:
>
>> Don't set the encoding here if you're piping. Just do: `var ws =
>> fs.createWriteStream(filename);`
>>
>
> See the comment above that line - I've tried both ways. Still occurs.
>
--
--
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
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.