PDF generator for metalsmith
Install wkhtmltopdf on your system.
And install this plugin:
$ npm install metalsmith-pdf
All options other than pattern
are passed directly to the wkhtmltopdf options parser
var pdf = require('metalsmith-pdf');
metalsmith.use(pdf({
pattern: "**/*.html",
printMediaType: true,
pageSize: "letter"
}));
All of the same options apply, just add them to the "plugins"
key in your metalsmith.json
configuration:
{
"plugins": {
"metalsmith-pdf": {
"pattern": "**/*.html",
"printMediaType": true,
"pageSize": "letter"
}
}
}
MIT