Comparing version 0.1.1 to 0.1.2
@@ -56,5 +56,9 @@ var fs, path, phantomjs, script, spawn; | ||
} | ||
return fs.unlink(filename, function(err) { | ||
if (!options.filename) { | ||
return fs.unlink(filename, function(err) { | ||
return callback(err, buffer); | ||
}); | ||
} else { | ||
return callback(err, buffer); | ||
}); | ||
} | ||
}); | ||
@@ -61,0 +65,0 @@ } |
{ | ||
"name": "html-pdf", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "HTML to PDF converter that uses phantomjs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,10 +29,10 @@ # node-html-pdf | ||
## Options | ||
`script`: Absolute path to a custom phantomjs script, use the file in lib/scripts as example | ||
`timeout`: Timeout that will cancel phantomjs, milliseconds as Integer, default: 10000 | ||
`filename`: The file path of the file that will be written. If you want to save the file permanently, you have to pass this option. | ||
`directory`: The directory path of the file that will be written. default: '/tmp' | ||
`script`: Absolute path to a custom phantomjs script, use the file in lib/scripts as example | ||
`timeout`: Timeout that will cancel phantomjs, milliseconds as Integer, default: 10000 | ||
`filename`: The file path of the file that will be written. If you want to save the file permanently, you have to pass this option. | ||
`directory`: The directory path of the file that will be written. default: '/tmp' | ||
The full options object gets converted to JSON and will get passed to the phantomjs script as third argument. | ||
The full options object gets converted to JSON and will get passed to the phantomjs script as third argument. | ||
There are more options concerning the paperSize, header & footer options inside the phantomjs script. | ||
There are more options concerning the paperSize, header & footer options inside the phantomjs script. | ||
Documentation will follow soon. | ||
## documentations for more available options will follow soon :) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12201
63