Skip to content
pdf generator for metalsmith
JavaScript HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.npmignore
LICENSE
README.md
index.js
package.json

README.md

metalsmith-pdf

PDF generator for metalsmith

Installation

Install wkhtmltopdf on your system.

And install this plugin:

$ npm install metalsmith-pdf

Usage

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"
}));

CLI Usage

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"
    }
  }
}

License

MIT

You can’t perform that action at this time.