Skip to content

Commit ac0406a

Browse files
committed
update README
1 parent 9c27001 commit ac0406a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ Example - for when ``wkhtmltopdf`` is not on ``$PATH``:
164164
config = pdfkit.configuration(wkhtmltopdf='/opt/bin/wkhtmltopdf')
165165
pdfkit.from_string(html_string, output_file, configuration=config)
166166
167+
Also you can use ``configuration()`` call to check if wkhtmltopdf is present in ``$PATH``:
168+
169+
.. code-block:: python
170+
171+
try:
172+
config = pdfkit.configuration()
173+
pdfkit.from_string(html_string, output_file)
174+
except OSError:
175+
#not present in PATH
176+
167177
168178
Troubleshooting
169179
---------------

0 commit comments

Comments
 (0)