diff --git a/src/calibre/ebooks/conversion/plugins/pdf_output.py b/src/calibre/ebooks/conversion/plugins/pdf_output.py index be48afc8dd..e270239b30 100644 --- a/src/calibre/ebooks/conversion/plugins/pdf_output.py +++ b/src/calibre/ebooks/conversion/plugins/pdf_output.py @@ -112,6 +112,9 @@ class PDFOutput(OutputFormatPlugin): OptionRecommendation(name='pdf_add_toc', recommended_value=False, help=_('Add a Table of Contents at the end of the PDF that lists page numbers. ' 'Useful if you want to print out the PDF. If this PDF is intended for electronic use, use the PDF Outline instead.')), + OptionRecommendation(name='toc_title', recommended_value=None, + help=_('Title for generated table of contents.') + ), ]) def convert(self, oeb_book, output_path, input_plugin, opts, log): diff --git a/src/calibre/ebooks/pdf/render/toc.py b/src/calibre/ebooks/pdf/render/toc.py index 9036aba166..6534248d86 100644 --- a/src/calibre/ebooks/pdf/render/toc.py +++ b/src/calibre/ebooks/pdf/render/toc.py @@ -64,7 +64,7 @@ def toc_as_html(toc, pdf, opts): ) ), BODY( - H1(_('Table of Contents')), + H1(opts.toc_title or _('Table of Contents')), TABLE(), ) ) diff --git a/src/calibre/gui2/convert/pdf_output.py b/src/calibre/gui2/convert/pdf_output.py index d06f22b672..54047321ee 100644 --- a/src/calibre/gui2/convert/pdf_output.py +++ b/src/calibre/gui2/convert/pdf_output.py @@ -23,7 +23,7 @@ class PluginWidget(Widget, Ui_Form): 'preserve_cover_aspect_ratio', 'pdf_serif_family', 'unit', 'pdf_sans_family', 'pdf_mono_family', 'pdf_standard_font', 'pdf_default_font_size', 'pdf_mono_font_size', 'pdf_page_numbers', - 'pdf_footer_template', 'pdf_header_template', 'pdf_add_toc', + 'pdf_footer_template', 'pdf_header_template', 'pdf_add_toc', 'toc_title', ]) self.db, self.book_id = db, book_id diff --git a/src/calibre/gui2/convert/pdf_output.ui b/src/calibre/gui2/convert/pdf_output.ui index d7ee899ffc..8c084ded53 100644 --- a/src/calibre/gui2/convert/pdf_output.ui +++ b/src/calibre/gui2/convert/pdf_output.ui @@ -232,6 +232,19 @@ + + + + + + + &Title for ToC: + + + opt_toc_title + + +