aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installation.rst
diff options
context:
space:
mode:
authorGeorge Hickman <george@ghickman.co.uk>2012-03-20 17:27:10 +0000
committerGeorge Hickman <george@ghickman.co.uk>2012-03-20 17:27:10 +0000
commit05abe3631696df591c5765ba13426febd6655a30 (patch)
treea65951c8049009a7206528e66c15d1bd4d74683d /docs/installation.rst
parentd3a3522cea3cf553ddf2f9345b01b548ddd6cf0c (diff)
downloaddjango-wkhtmltopdf-05abe3631696df591c5765ba13426febd6655a30.tar.gz
django-wkhtmltopdf-05abe3631696df591c5765ba13426febd6655a30.tar.bz2
django-wkhtmltopdf-05abe3631696df591c5765ba13426febd6655a30.zip
Start the docs
Diffstat (limited to 'docs/installation.rst')
-rw-r--r--docs/installation.rst72
1 files changed, 72 insertions, 0 deletions
diff --git a/docs/installation.rst b/docs/installation.rst
new file mode 100644
index 0000000..d927482
--- /dev/null
+++ b/docs/installation.rst
@@ -0,0 +1,72 @@
+Package
+=======
+PyPI
+----
+
+.. code-block:: bash
+
+ pip install django-wkhtmltopdf
+
+
+GitHub
+------
+
+.. code-block:: bash
+
+ git clone git://github.com/incuna/django-wkhtmltopdf.git
+ cd django-wkhtmltopdf
+ python setup.py install
+
+
+Binary
+======
+
+Find the relevant download link on the ``wkhtmltopdf`` project `downloads page`_.
+
+This requires libfontconfig (on Ubuntu: ``sudo aptitude install libfontconfig``).
+
+.. _downloads page: http://code.google.com/p/wkhtmltopdf/downloads/list
+
+.. note::
+
+ The wkhtmltopdf downloads page can be quite confusing. Make sure you get
+ wkhtmltopdf (there are a few different libraries on there) and the correct platform.
+
+
+.. note::
+
+ At the time of writing it was possible to install wkhtmltopdf from Homebrew
+ and apt-get/aptitude but required compilation of QT which can take quite a
+ while so the binary installation is recommended.
+
+
+.. note::
+
+ There is an known issue on 64bit machines where wkhtmltopdf will fail
+ silently. `This page`_ details ways to get around this but the easiest
+ way to fix the issue is to install the 32bit binary.
+
+
+Django
+======
+
+Add ``wkhtmltopdf`` to your ``INSTALLED_APPS``:
+
+.. code-block:: python
+
+ INSTALLED_APPS = (
+ # ...
+ 'wkhtmltopdf',
+ # ...
+ )
+
+By default it will execute the first wkhtmltopdf command found on your ``PATH``.
+
+If you can't add wkhtmltopdf to your ``PATH``, you can set ``WKHTMLTOPDF_CMD`` to a specific execuatable:
+
+e.g.: in ``settings.py``
+
+.. code-block:: python
+
+ WKHTMLTOPDF_CMD = '/path/to/my/wkhtmltopdf'
+