Skip to content

Commit 20e62dc

Browse files
author
Matheus Marchini
committed
Update the README with information about passing multiple CSS files
1 parent bff2e7c commit 20e62dc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,24 @@ Due to wkhtmltopdf command syntax, **TOC** and **Cover** options must be specifi
102102
103103
pdfkit.from_file('file.html', options=options, toc=toc, cover=cover)
104104
105-
You can specify external CSS file when converting files or strings using *css* option.
105+
You can specify external CSS files when converting files or strings using *css* option.
106106

107107
**Warning** This is a workaround for `this bug <http://code.google.com/p/wkhtmltopdf/issues/detail?id=144>`_ in wkhtmltopdf. You should try *--user-style-sheet* option first.
108108

109109
.. code-block:: python
110110
111+
# Single CSS file
111112
css = 'example.css'
112113
113114
pdfkit.from_file('file.html', options=options, css=css)
114115
116+
117+
# Multiple CSS files
118+
119+
css = ['example.css', 'example2.css']
120+
121+
pdfkit.from_file('file.html', options=options, css=css)
122+
115123
You can also pass any options through meta tags in your HTML:
116124

117125
.. code-block:: python

0 commit comments

Comments
 (0)