Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerozAndOnes authored Jul 14, 2022
1 parent c63122f commit 971cbb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pdf.create(html, options).toFile('./businesscard.pdf', function(err, res) {

```js
var pdf = require('html-pdf');
pdf.create(html).toFile([filepath, ]function(err, res){
pdf.create(html).toFile([filepath, ], function(err, res){
console.log(res.filename);
});

Expand Down
2 changes: 1 addition & 1 deletion lib/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PDF.prototype.toStream = function PdfToStream (callback) {
}

PDF.prototype.toFile = function PdfToFile (filename, callback) {
assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ]callback) requires a callback.')
assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ], callback) requires a callback.')
if (filename instanceof Function) {
callback = filename
filename = undefined
Expand Down

0 comments on commit 971cbb6

Please sign in to comment.