Skip to content

Commit 5d4dfce

Browse files
committed
Change the documentation examples to reflect the new third argument of the callback for toBuffer and toStream
1 parent 22271b0 commit 5d4dfce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ pdf.create(html).toFile([filepath, ]function(err, res){
4545
console.log(res.filename);
4646
});
4747

48-
pdf.create(html).toStream(function(err, stream){
48+
pdf.create(html).toStream(function(err, stream, res){
4949
stream.pipe(fs.createWriteStream('./foo.pdf'));
5050
});
5151

52-
pdf.create(html).toBuffer(function(err, buffer){
52+
pdf.create(html).toBuffer(function(err, buffer, res){
5353
console.log('This is a buffer:', Buffer.isBuffer(buffer));
5454
});
5555

0 commit comments

Comments
 (0)