PDF Output: Fix the option to break long words at the end of lines not working since calibre 4. Fixes #1854349 [pdf-hyphenate no longer hyphenating pdfs](https://bugs.launchpad.net/calibre/+bug/1854349) [pdf-hyphenate no longer hyphenating pdfs](https://bugs.launchpad.net/calibre/+bug/1854349)

This commit is contained in:
Kovid Goyal 2019-12-02 20:32:02 +05:30
parent e757597971
commit 14819b4ec7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1143,6 +1143,9 @@ def add_maths_script(container):
def convert(opf_path, opts, metadata=None, output_path=None, log=default_log, cover_data=None, report_progress=lambda x, y: None):
container = Container(opf_path, log)
report_progress(0.05, _('Parsed all content for markup transformation'))
if opts.pdf_hyphenate:
from calibre.ebooks.oeb.polish.hyphenation import add_soft_hyphens
add_soft_hyphens(container)
has_maths = add_maths_script(container)
fix_fullscreen_images(container)