Skip to content

Commit a27ccc4

Browse files
committed
Merge pull request JazzCore#13 from mmarchini/css_list_documentation
Update README.rst with information about passing multiple CSS files
2 parents bff2e7c + 3f72c3b commit a27ccc4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,19 @@ 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-
css = 'example.css'
111+
# Single CSS file
112+
css = 'example.css'
113+
pdfkit.from_file('file.html', options=options, css=css)
112114
113-
pdfkit.from_file('file.html', options=options, css=css)
115+
# Multiple CSS files
116+
css = ['example.css', 'example2.css']
117+
pdfkit.from_file('file.html', options=options, css=css)
114118
115119
You can also pass any options through meta tags in your HTML:
116120

0 commit comments

Comments
 (0)