1 line
No EOL
2.2 KiB
JSON
1 line
No EOL
2.2 KiB
JSON
{"tagline":"Grunt Task that uses wkhtmltopdf to convert HTML files to PDF","note":"Don't delete this file! It's used internally to help with page regeneration.","body":"# grunt-wkhtmltopdf\r\n\r\nA simple [Grunt][grunt] task that uses [wkhtmltopdf][wkhtmltopdf] to convert HTML files to PDF.\r\nConvertion to PDF takes care of `@media print` CSS rules and preserves links to remote web pages.\r\n\r\n## Getting Started\r\n\r\n### Setting up wkhtmltopdf \r\n\r\nDownload and install wkhtmltopdf from the [project page][wkhtmltopdf_dl].\r\n\r\nMake sure `wkhtmltopdf` is accessible from your `PATH` (Try `wkhtmltopdf -V` in your Terminal). \r\nI'm on Mas OS X, so I created the following symlink to my `/usr/local/bin/` folder:\r\n\r\n```\r\nln -s /usr/local/bin/wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf /usr/local/bin/wkhtmltopdf\r\n```\r\n\r\n### Use it with grunt\r\n\r\nInstall this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-wkhtmltopdf`\r\n\r\nThen add this line to your project's `grunt.js` gruntfile:\r\n\r\n```javascript\r\ngrunt.loadNpmTasks('grunt-wkhtmltopdf');\r\n```\r\n\r\n[wkhtmltopdf]: http://code.google.com/p/wkhtmltopdf/\r\n[wkhtmltopdf_dl]: http://code.google.com/p/wkhtmltopdf/downloads/list\r\n[grunt]: https://github.com/cowboy/grunt\r\n[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md\r\n\r\n## Documentation\r\nSimply add the following to your gruntfile:\r\n\r\n```javascript\r\n //...\r\n wkhtmltopdf: {\r\n src: 'path/to/some/html/file/*.html',\r\n dest: 'pdf/output/'\r\n },\r\n //...\r\n```\r\n\r\nThen run `grunt wkhtmltopdf` or use it as any other grunt task. Every `html` file in your `path/to/some/html/file/` folder will be turned into a PDF and saved to `pdf/output/` folder.\r\n\r\n## Contributing\r\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][grunt].\r\n\r\n## Release History\r\n\r\n - *v0.1.0*: First Release\r\n\r\n## License\r\nCopyright (c) 2012 Olivier Audard \r\nLicensed under the MIT license.\r\n","name":"Grunt-wkhtmltopdf","google":"UA-1823374-1"} |