You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,9 +101,25 @@ You can also pass any options through meta tags in your HTML:
101
101
102
102
pdfkit.from_string(body, 'out.pdf') #with --page-size=Legal and --orientation=Landscape
103
103
104
+
Configuration
105
+
-------------
106
+
107
+
Each API call takes an optional configuration paramater. This should be an instance of ``pdfkit.configuration.Configuration()`` - it takes the configuration options as initial paramaters. The available options are:
108
+
109
+
* ``wkhtmltopdf`` - the location of the ``wkhtmltopdf`` binary. By default ``pdfkit`` will attempt to locate this using ``which`` (on UNIX type systems) or ``where`` (on Windows).
110
+
* ``meta_tag_prefix`` - the prefix for ``pdfkit`` specific meta tags - by default this is ``pdfkit-``
111
+
112
+
Example - for when ``wkhtmltopdf`` is not on ``$PATH``:
Make sure that you have wkhtmltopdf in your PATH. *where wkhtmltopdf* in Windows or *which wkhtmltopdf* on Linux should return actual path to binary.
125
+
Make sure that you have wkhtmltopdf in your `$PATH` or set via custom configuration (see preceding section). *where wkhtmltopdf* in Windows or *which wkhtmltopdf* on Linux should return actual path to binary.
0 commit comments