From b6558233f5cb5345642c58a865e40c5a304e522c Mon Sep 17 00:00:00 2001 From: Olivier Audard Date: Sun, 14 Oct 2012 22:01:07 +0200 Subject: [PATCH 01/15] grunt-wkhtmltopdf is now a multi-task --- README.md | 18 +++++++++++++----- package.json | 2 +- tasks/wkhtmltopdf.js | 10 +++------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9e174c8..030dc8b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # grunt-wkhtmltopdf -A simple [Grunt][grunt] task that uses [wkhtmltopdf][wkhtmltopdf] to convert HTML files to PDF. +A simple [Grunt][grunt] multitask that uses [wkhtmltopdf][wkhtmltopdf] to convert HTML files to PDF. Convertion to PDF takes care of `@media print` CSS rules and preserves links to remote web pages. ## Getting Started @@ -32,18 +32,24 @@ grunt.loadNpmTasks('grunt-wkhtmltopdf'); [getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md ## Documentation -Simply add the following to your gruntfile: +Simply add task definition in your gruntfile. See the folllowing example: ```javascript //... wkhtmltopdf: { - src: 'path/to/some/html/file/*.html', - dest: 'pdf/output/' + dev: { + src: 'path/to/some/html/file/*.html', + dest: 'pdf/output/' + }, + prod: { + src: 'path/to/some/html/file/*.html', + dest: 'pdf/output/' + } }, //... ``` -Then 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. +Run `grunt wkhtmltopdf` to execute all the targets or `grunt wkhtmltopdf:targetname` to execute a specific target. Every `html` file defined by the `src` parameter will be turned into a PDF and saved to `dest` folder. ## Contributing In 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]. @@ -51,6 +57,8 @@ In lieu of a formal styleguide, take care to maintain the existing coding style. ## Release History - *v0.1.0*: First Release + - *v0.2.0*: Fixed compatibility with grunt 0.4 + - *v0.3.0*: grunt-wkhtmltopdf is now a multi-task ## License Copyright (c) 2012 Olivier Audard diff --git a/package.json b/package.json index 21181de..a677a37 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-wkhtmltopdf", "description": "Grunt Task that uses wkhtmltopdf to convert HTML files to PDF", - "version": "0.2.0", + "version": "0.3.0", "homepage": "http://www.dhar.fr/grunt-wkhtmltopdf/", "author": { "name": "Olivier Audard", diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index ec0e2ec..ee673be 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -16,14 +16,10 @@ module.exports = function(grunt) { // ========================================================================== var helper = require('./lib/wkhtmltopdf-lib').init(grunt); - grunt.registerTask('wkhtmltopdf', 'Your task description goes here.', function() { - grunt.config.requires('wkhtmltopdf.src'); - grunt.config.requires('wkhtmltopdf.dest'); + grunt.registerMultiTask('wkhtmltopdf', 'Your task description goes here.', function() { - var conf = grunt.config('wkhtmltopdf'); - - var htmlFiles = grunt.file.expandFiles(conf.src), - dest = (conf.dest && conf.dest !== '') ? conf.dest + '/' : ''; + var htmlFiles = grunt.file.expandFiles(this.file.src), + dest = (this.file.dest && this.file.dest !== '') ? this.file.dest + '/' : ''; grunt.log.writeln("pdf output is: " + dest); From f8bfe3cdb9f7c8f52ecc04b8ab5902f63a5dc004 Mon Sep 17 00:00:00 2001 From: SonicHedgehog Date: Thu, 29 Nov 2012 08:50:33 +0100 Subject: [PATCH 02/15] Update Grunt link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 030dc8b..474873f 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ grunt.loadNpmTasks('grunt-wkhtmltopdf'); [wkhtmltopdf]: http://code.google.com/p/wkhtmltopdf/ [wkhtmltopdf_dl]: http://code.google.com/p/wkhtmltopdf/downloads/list -[grunt]: https://github.com/cowboy/grunt +[grunt]: https://github.com/gruntjs/grunt [getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md ## Documentation From b8aad1b7d83b5f98d5cec43cc65013fb53c67138 Mon Sep 17 00:00:00 2001 From: Erwann Mest Date: Wed, 29 May 2013 23:16:36 +0200 Subject: [PATCH 03/15] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 474873f..0f2c213 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,15 @@ Convertion to PDF takes care of `@media print` CSS rules and preserves links to Download and install wkhtmltopdf from the [project page][wkhtmltopdf_dl]. Make sure `wkhtmltopdf` is accessible from your `PATH` (Try `wkhtmltopdf -V` in your Terminal). -I'm on Mas OS X, so I created the following symlink to my `/usr/local/bin/` folder: +I'm on Mac OS X, so I created the following symlink to my `/usr/local/bin/` folder: ``` ln -s /usr/local/bin/wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf /usr/local/bin/wkhtmltopdf ``` +You can also install it via homebrew: `$ brew install wkhtmltopdf`. + + ### Use it with grunt Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-wkhtmltopdf` From 847b3f3697d735b5028d820a06168020d6f766af Mon Sep 17 00:00:00 2001 From: Brent Houghton Date: Mon, 9 Jun 2014 13:43:41 -0700 Subject: [PATCH 04/15] Update project config files to work with Grunt 0.4. --- grunt.js => Gruntfile.js | 27 ++++++++++++++++----------- package.json | 5 ++++- 2 files changed, 20 insertions(+), 12 deletions(-) rename grunt.js => Gruntfile.js (60%) diff --git a/grunt.js b/Gruntfile.js similarity index 60% rename from grunt.js rename to Gruntfile.js index 008da40..ccdf7bd 100644 --- a/grunt.js +++ b/Gruntfile.js @@ -1,12 +1,14 @@ +'use strict'; + module.exports = function(grunt) { + // Load grunt tasks automatically + require('load-grunt-tasks')(grunt); + // Project configuration. grunt.initConfig({ - test: { - files: ['test/**/*.js'] - }, - lint: { - files: ['grunt.js', 'tasks/**/*.js', 'test/**/*.js'] + nodeunit: { + all: ['test/**/_test.js'] }, watch: { files: '', @@ -25,16 +27,19 @@ module.exports = function(grunt) { boss: true, eqnull: true, node: true, - es5: true }, - globals: {} + all: [ + 'Gruntfile.js', + 'tasks/{,*/}*.js', + 'test/{,*/}*.js', + ] } }); - // Load local tasks. - grunt.loadTasks('tasks'); - // Default task. - grunt.registerTask('default', 'lint test'); + grunt.registerTask('default', [ + 'jshint', + 'nodeunit:all' + ]); }; diff --git a/package.json b/package.json index a677a37..ce0ae41 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,10 @@ "grunt": "~0.3.9" }, "devDependencies": { - "grunt": "~0.3.9" + "grunt": "~0.4.1", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-nodeunit": "^0.4.0", + "load-grunt-tasks": "^0.4.0" }, "keywords": [ "gruntplugin", From 7f9813423fbbff0fc9db522989c698bdfffc597e Mon Sep 17 00:00:00 2001 From: Brent Houghton Date: Mon, 9 Jun 2014 14:40:24 -0700 Subject: [PATCH 05/15] Update wkthmltopdf task to use Grunt 0.4 multi-task API. --- tasks/wkhtmltopdf.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index ee673be..c28506c 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -18,12 +18,12 @@ module.exports = function(grunt) { grunt.registerMultiTask('wkhtmltopdf', 'Your task description goes here.', function() { - var htmlFiles = grunt.file.expandFiles(this.file.src), - dest = (this.file.dest && this.file.dest !== '') ? this.file.dest + '/' : ''; + this.files.forEach(function(file) { + var srcpath = file.src.toString(), + dest = (file.dest && file.dest !== '') ? file.dest + '/' : ''; - grunt.log.writeln("pdf output is: " + dest); + grunt.log.writeln("pdf output is: " + dest); - htmlFiles.forEach(function(srcpath) { var dir = dest + srcpath.replace(/.*\/([^\/]+)\/[^\/]+\.html/, '$1'); // Create dest folder as wkhtmltopdf won't generate output if it doesn't exist From 469ff6bb422abed639d9281f2b68a8fb885e0d0d Mon Sep 17 00:00:00 2001 From: Brent Houghton Date: Thu, 12 Jun 2014 10:26:59 -0700 Subject: [PATCH 06/15] Update a lingering reference to Grunt 0.3. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ce0ae41..925f2a0 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "test": "grunt test" }, "dependencies": { - "grunt": "~0.3.9" + "grunt": "~0.4.1" }, "devDependencies": { "grunt": "~0.4.1", @@ -44,4 +44,4 @@ "convert", "html" ] -} \ No newline at end of file +} From dad2687587ad619a29dd4f34eafb1c0c59c4fd49 Mon Sep 17 00:00:00 2001 From: Brent Houghton Date: Thu, 12 Jun 2014 11:40:03 -0700 Subject: [PATCH 07/15] Improve predictability of the destination for created PDFs. Now generated PDFs are placed at the destination specified in the end-users's Gruntfile, rather than appending the source file's path to the destination path. The created PDFs have the same name as the source HTML file, excep the file extension is changed to .pdf. --- tasks/wkhtmltopdf.js | 65 +++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index c28506c..6f6dc05 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -19,32 +19,53 @@ module.exports = function(grunt) { grunt.registerMultiTask('wkhtmltopdf', 'Your task description goes here.', function() { this.files.forEach(function(file) { - var srcpath = file.src.toString(), - dest = (file.dest && file.dest !== '') ? file.dest + '/' : ''; - grunt.log.writeln("pdf output is: " + dest); + var pathlib = require('path'); + // calculate the destination directory and ensure it exists, since + // wkhtmltopdf won't create the PDF if the destination directory doesn't + // exist + var destPath = file.dest; + if (grunt.file.isFile(file.dest)) { + destPath = pathlib.dirname(file.dest); + } + grunt.file.mkdir(destPath); - var dir = dest + srcpath.replace(/.*\/([^\/]+)\/[^\/]+\.html/, '$1'); + file.src.forEach(function(src) { - // Create dest folder as wkhtmltopdf won't generate output if it doesn't exist - grunt.file.mkdir(dir); - var destpath = dir + '/' + - srcpath.replace(/.*\/([^\/]+)\.html/, '$1.pdf'); - - // Launch PhantomJS. - helper.convert({ - code: 90, - args: [ - '--dpi', '96', // workarround to wkhtmltopdf letter-spacing bug (see http://code.google.com/p/wkhtmltopdf/issues/detail?id=72) - '--print-media-type', // Use @print media type - srcpath, - destpath - ], - done: function(err) { - if (err) { - grunt.log('>>>', err); - } + var dest = file.dest; + // wkhtmltopdf seems to require that the destination be a file + // location, not a directory, so if the given destination is a + // directory then append the name of the source file but with the + // extension changed to .pdf + if (grunt.file.isDir(dest)) { + var srcFileName = pathlib.basename(src); + var srcFileExtension = pathlib.extname(src); + var destFileName = srcFileName.replace( + new RegExp(srcFileExtension + "$"), // match only the end of the string + ".pdf" + ); + dest = pathlib.join(destPath + destFileName); } + + grunt.log.writeln( + "Converting " + src + " -> " + dest + ); + + // Launch PhantomJS. + helper.convert({ + code: 90, + args: [ + '--dpi', '96', // workarround to wkhtmltopdf letter-spacing bug (see http://code.google.com/p/wkhtmltopdf/issues/detail?id=72) + '--print-media-type', // Use @print media type + src, + dest + ], + done: function(err) { + if (err) { + grunt.log('>>>', err); + } + } + }); }); }); }); From 2bcb115dfea22152888f87fd6e5fea0f83317fea Mon Sep 17 00:00:00 2001 From: Olivier Audard Date: Thu, 12 Jun 2014 21:39:34 +0200 Subject: [PATCH 08/15] Bump version to 0.4.0 Also update README with lastest changes --- README.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f2c213..1770a68 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,10 @@ In lieu of a formal styleguide, take care to maintain the existing coding style. - *v0.1.0*: First Release - *v0.2.0*: Fixed compatibility with grunt 0.4 - *v0.3.0*: grunt-wkhtmltopdf is now a multi-task - + - *v0.4.0*: + - Update project config files to work with Grunt 0.4 + - Update wkthmltopdf task to use Grunt 0.4 multi-task API + - Improve predictability of the destination for created PDFs ## License Copyright (c) 2012 Olivier Audard Licensed under the MIT license. diff --git a/package.json b/package.json index 925f2a0..4b0888f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-wkhtmltopdf", "description": "Grunt Task that uses wkhtmltopdf to convert HTML files to PDF", - "version": "0.3.0", + "version": "0.4.0", "homepage": "http://www.dhar.fr/grunt-wkhtmltopdf/", "author": { "name": "Olivier Audard", From 4a06d927417a57e8cef5054be1fd6de7243c8a56 Mon Sep 17 00:00:00 2001 From: dhar Date: Thu, 12 Jun 2014 22:04:46 +0200 Subject: [PATCH 09/15] Fix typo in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1770a68..0eeeaed 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ In lieu of a formal styleguide, take care to maintain the existing coding style. - Update project config files to work with Grunt 0.4 - Update wkthmltopdf task to use Grunt 0.4 multi-task API - Improve predictability of the destination for created PDFs + ## License Copyright (c) 2012 Olivier Audard Licensed under the MIT license. From 5b29b57245b5c1f12a00d9f8600298c07632bce2 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 4 Sep 2014 11:05:03 -0400 Subject: [PATCH 10/15] Added ability to override the arguments I needed to be able to use a different set of arguments. Updated to allow for the args to be passed in the same way the src and dest are. Could improve by comparing the two arrays instead of simply overriding them. --- tasks/wkhtmltopdf.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index 6f6dc05..8fb4def 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -51,15 +51,24 @@ module.exports = function(grunt) { "Converting " + src + " -> " + dest ); - // Launch PhantomJS. + // default args + var args = [ + '--dpi', '96', // workarround to wkhtmltopdf letter-spacing bug (see http://code.google.com/p/wkhtmltopdf/issues/detail?id=72) + '--print-media-type', // Use @print media type + ]; + + // overrides the args + if (file.args) { + args = file.args; + } + + // adds the src and dest + args = args.concat([src, dest]); + + // Launch wkhtmltopdf. helper.convert({ code: 90, - args: [ - '--dpi', '96', // workarround to wkhtmltopdf letter-spacing bug (see http://code.google.com/p/wkhtmltopdf/issues/detail?id=72) - '--print-media-type', // Use @print media type - src, - dest - ], + args: args, done: function(err) { if (err) { grunt.log('>>>', err); From b21de20c739b44ade9d446d060a4f2f28db54a86 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Mon, 8 Dec 2014 14:54:53 -0500 Subject: [PATCH 11/15] Update README.md Updated links for wkhtmltopdf as the project has moved --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0eeeaed..3cca3a4 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ Then add this line to your project's `grunt.js` gruntfile: grunt.loadNpmTasks('grunt-wkhtmltopdf'); ``` -[wkhtmltopdf]: http://code.google.com/p/wkhtmltopdf/ -[wkhtmltopdf_dl]: http://code.google.com/p/wkhtmltopdf/downloads/list +[wkhtmltopdf]: http://wkhtmltopdf.org/ +[wkhtmltopdf_dl]: http://wkhtmltopdf.org/downloads.html [grunt]: https://github.com/gruntjs/grunt [getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md From 38007b19ad8812c5bfdb80f775e1da6e35a82c17 Mon Sep 17 00:00:00 2001 From: Andy Dayton Date: Sat, 24 Jan 2015 21:43:26 -0500 Subject: [PATCH 12/15] Try adding grunt async and creating a simple index check --- tasks/wkhtmltopdf.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index 6f6dc05..9b37a80 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -18,7 +18,9 @@ module.exports = function(grunt) { grunt.registerMultiTask('wkhtmltopdf', 'Your task description goes here.', function() { - this.files.forEach(function(file) { + var done = this.async(); + + this.files.forEach(function(file, filesIndex) { var pathlib = require('path'); // calculate the destination directory and ensure it exists, since @@ -30,7 +32,7 @@ module.exports = function(grunt) { } grunt.file.mkdir(destPath); - file.src.forEach(function(src) { + file.src.forEach(function(src, srcIndex) { var dest = file.dest; // wkhtmltopdf seems to require that the destination be a file @@ -64,6 +66,10 @@ module.exports = function(grunt) { if (err) { grunt.log('>>>', err); } + // if this is the last src of the last file, we are done. + if((filesIndex+1 >= files.length) && (srcIndex+1 >= src.length)) { + done(); + } } }); }); From 696955b345693879fa0b3baa6c8f144586cbc3d6 Mon Sep 17 00:00:00 2001 From: Andy Dayton Date: Sat, 24 Jan 2015 21:57:51 -0500 Subject: [PATCH 13/15] Added some comments --- tasks/wkhtmltopdf.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index 9b37a80..5000ec3 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -18,9 +18,13 @@ module.exports = function(grunt) { grunt.registerMultiTask('wkhtmltopdf', 'Your task description goes here.', function() { - var done = this.async(); + // using grunt async support so we can be sure task doesn't + // end before PDF processing does: http://gruntjs.com/api/inside-tasks + var done = this.async(), + files = this.files; - this.files.forEach(function(file, filesIndex) { + // iterate through each file grouping + files.forEach(function(file, filesIndex) { var pathlib = require('path'); // calculate the destination directory and ensure it exists, since @@ -67,7 +71,7 @@ module.exports = function(grunt) { grunt.log('>>>', err); } // if this is the last src of the last file, we are done. - if((filesIndex+1 >= files.length) && (srcIndex+1 >= src.length)) { + if((filesIndex+1 >= files.length) && (srcIndex+1 >= file.src.length)) { done(); } } From 69a270f60425a7077bdb33af13b4b037d33de4d4 Mon Sep 17 00:00:00 2001 From: Olivier Audard Date: Sun, 22 Feb 2015 11:03:01 +0100 Subject: [PATCH 14/15] Updated README --- README.md | 63 +++++++++++++++++++++++++++++++++++--------- tasks/wkhtmltopdf.js | 2 +- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3cca3a4..d60efb5 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ Convertion to PDF takes care of `@media print` CSS rules and preserves links to ## Getting Started -### Setting up wkhtmltopdf +### Setting up wkhtmltopdf Download and install wkhtmltopdf from the [project page][wkhtmltopdf_dl]. -Make sure `wkhtmltopdf` is accessible from your `PATH` (Try `wkhtmltopdf -V` in your Terminal). +Make sure `wkhtmltopdf` is accessible from your `PATH` (Try `wkhtmltopdf -V` in your Terminal). I'm on Mac OS X, so I created the following symlink to my `/usr/local/bin/` folder: ``` @@ -29,11 +29,6 @@ Then add this line to your project's `grunt.js` gruntfile: grunt.loadNpmTasks('grunt-wkhtmltopdf'); ``` -[wkhtmltopdf]: http://wkhtmltopdf.org/ -[wkhtmltopdf_dl]: http://wkhtmltopdf.org/downloads.html -[grunt]: https://github.com/gruntjs/grunt -[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md - ## Documentation Simply add task definition in your gruntfile. See the folllowing example: @@ -54,19 +49,61 @@ Simply add task definition in your gruntfile. See the folllowing example: Run `grunt wkhtmltopdf` to execute all the targets or `grunt wkhtmltopdf:targetname` to execute a specific target. Every `html` file defined by the `src` parameter will be turned into a PDF and saved to `dest` folder. +### Sending arguments to `wkhtml2pdf` + +Arguments sent via the `args` key in the task definition will be forwarded to `wkhtml2pdf` as follow : + +```javascript + //... + wkhtmltopdf: { + prod: { + src: 'path/to/some/html/file/*.html', + dest: 'pdf/output/', + args: [ + '--dpi', '96', + '--print-media-type', + '--grayscale' + ] + } + }, + //... +``` + +Defining custom arguments will override default ones: + +```javascript +// grunt-wkhtml2pdf default arguments +var args = [ + '--dpi', '96', + '--print-media-type' +] +``` + +See [wkhtml2pdf documentation][wkhtmltopdf_doc] for available options + ## Contributing In 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]. ## Release History - - *v0.1.0*: First Release - - *v0.2.0*: Fixed compatibility with grunt 0.4 - - *v0.3.0*: grunt-wkhtmltopdf is now a multi-task - - *v0.4.0*: + - *v0.5.0*: + - Merged #12 (Fix #11) : Added async support + - Merged #9 : Added ability to override the arguments + - *v0.4.0*: - Update project config files to work with Grunt 0.4 - Update wkthmltopdf task to use Grunt 0.4 multi-task API - - Improve predictability of the destination for created PDFs + - Improve predictability of the destination for created PDFs + - *v0.3.0*: grunt-wkhtmltopdf is now a multi-task + - *v0.2.0*: Fixed compatibility with grunt 0.4 + - *v0.1.0*: First Release ## License -Copyright (c) 2012 Olivier Audard +Copyright (c) 2012 Olivier Audard Licensed under the MIT license. + + +[wkhtmltopdf]: http://wkhtmltopdf.org/ +[wkhtmltopdf_dl]: http://wkhtmltopdf.org/downloads.html +[wkhtmltopdf_doc]: http://wkhtmltopdf.org/docs.html +[grunt]: https://github.com/gruntjs/grunt +[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md diff --git a/tasks/wkhtmltopdf.js b/tasks/wkhtmltopdf.js index faf1580..375915d 100644 --- a/tasks/wkhtmltopdf.js +++ b/tasks/wkhtmltopdf.js @@ -60,7 +60,7 @@ module.exports = function(grunt) { // default args var args = [ '--dpi', '96', // workarround to wkhtmltopdf letter-spacing bug (see http://code.google.com/p/wkhtmltopdf/issues/detail?id=72) - '--print-media-type', // Use @print media type + '--print-media-type' // Use @print media type ]; // overrides the args From f7a76fa9525e77d9ca0437449e26a55bb6afc559 Mon Sep 17 00:00:00 2001 From: dhar Date: Sun, 22 Feb 2015 11:44:31 +0100 Subject: [PATCH 15/15] Fix links in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d60efb5..b55cf47 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,8 @@ In lieu of a formal styleguide, take care to maintain the existing coding style. ## Release History - *v0.5.0*: - - Merged #12 (Fix #11) : Added async support - - Merged #9 : Added ability to override the arguments + - Merged [#12](https://github.com/dharFr/grunt-wkhtmltopdf/pull/12) (Fix [#11](https://github.com/dharFr/grunt-wkhtmltopdf/issues/11)) : Added async support + - Merged [#9](https://github.com/dharFr/grunt-wkhtmltopdf/pull/9) : Added ability to override the arguments - *v0.4.0*: - Update project config files to work with Grunt 0.4 - Update wkthmltopdf task to use Grunt 0.4 multi-task API