commit 0405b678eaf93c43ffe7bf11794125e15422e649 Author: dhar Date: Sat Aug 25 18:57:25 2012 -0700 Create gh-pages branch via GitHub diff --git a/index.html b/index.html new file mode 100644 index 0000000..67c020d --- /dev/null +++ b/index.html @@ -0,0 +1,103 @@ + + + + + + Grunt-wkhtmltopdf by dharFr + + + + + + + +
+
+

Grunt-wkhtmltopdf

+

Grunt Task that uses wkhtmltopdf to convert HTML files to PDF

+ +

View the Project on GitHub dharFr/grunt-wkhtmltopdf

+ + + +
+
+

grunt-wkhtmltopdf

+ +

A simple Grunt task that uses 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

+ +

Setting up wkhtmltopdf

+ +

Download and install wkhtmltopdf from the project page.

+ +

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:

+ +
ln -s /usr/local/bin/wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf /usr/local/bin/wkhtmltopdf
+
+ +

Use it with grunt

+ +

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-wkhtmltopdf

+ +

Then add this line to your project's grunt.js gruntfile:

+ +
grunt.loadNpmTasks('grunt-wkhtmltopdf');
+
+ +

Documentation

+ +

Simply add the following to your gruntfile:

+ +
    //...
+    wkhtmltopdf: {
+      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.

+ +

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.

+ +

Release History

+ +
    +
  • +v0.1.0: First Release
  • +

License

+ +

Copyright (c) 2012 Olivier Audard
+Licensed under the MIT license.

+
+
+

This project is maintained by dharFr

+

Hosted on GitHub Pages — Theme by orderedlist

+
+
+ + + + + + \ No newline at end of file diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js new file mode 100644 index 0000000..87a40ca --- /dev/null +++ b/javascripts/scale.fix.js @@ -0,0 +1,17 @@ +var metas = document.getElementsByTagName('meta'); +var i; +if (navigator.userAgent.match(/iPhone/i)) { + for (i=0; i