How can we convert a epub file to a pdf file, preserving bookmarks for toc?
I use ebook-convert (calibre 0.8.38)
to convert a epub file to a pdf file.
$ ebook-convert in.epub out.pdf
The epub file has bookmarks for table of content, while the output pdf file doesn't (See the two pictures below)
I also tried
$ ebook-convert in.epub out.pdf --pdf-add-toc
ebook-convert: error: no such option: --pdf-add-toc
which failed maybe because my calibre is too old? (Anyone having the latest Calibre can help to try?)
Is there other program or online converter which may help? Thanks.
original epub file with bookmarks for toc:
output pdf file without bookmarks for toc (evince calls "Index" for bookmarks, and "Bookmarks" for something else):