When I call
Code:
ebook-convert tmp.md tmp.pdf --extra-css tmp.css --pdf-add-toc --level1-toc "//h:h1"
with a source file
I get this error:
Code:
Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
File "runpy.py", line 86, in _run_code
File "site.py", line 47, in <module>
File "site.py", line 43, in main
File "calibre/ebooks/conversion/cli.py", line 419, in main
File "calibre/ebooks/conversion/plumber.py", line 1281, in run
File "calibre/ebooks/conversion/plugins/pdf_output.py", line 183, in convert
File "calibre/ebooks/conversion/plugins/pdf_output.py", line 249, in convert_text
File "calibre/ebooks/pdf/html_writer.py", line 1163, in convert
File "calibre/ebooks/pdf/html_writer.py", line 757, in add_pagenum_toc
TypeError: can only concatenate str (not "bytes") to str
If I leave out any of the three -- options, the command is successful. If I don't use # Title then also. It also works fine with epub.
My Calibre version is 6.10, system ist Ubuntu 22.4, fresh install.
What can I do to use extra css and a TOC together?