pdf-hyphenate no longer hyphenating pdfs

Bug #1854349 reported by jimbojw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

calibre version 4.4 (git 163b2dfd2d via CALIBRE_DEVELOP_FROM)
OS: ubuntu

The --pdf-hyphenate option seems to no longer hyphenate long words when generating PDFs from HTML/epub input.

Command:

  ebook-convert wealth-excerpt.html wealth-excerpt.pdf --pdf-default-font-size=48

Revision history for this message
jimbojw (jimbojw) wrote :
Revision history for this message
jimbojw (jimbojw) wrote :
Revision history for this message
jimbojw (jimbojw) wrote :

Sorry, command:

  ebook-convert wealth-excerpt.html wealth-excerpt.pdf --pdf-default-font-size=48 --pdf-hyphenate

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1854349

Yes, this is a limitation of WebEngine, it has no support for
hyphenation. I suggest using the calibre hyphenation plugin to
pre-hyphenate the book before conversion. At some point I might use
hyphenate.js to hack in hyphenation, but until then, this is a wontfix.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Revision history for this message
jimbojw (jimbojw) wrote :

If --pdf-hyphenate doesn't hyphenate PDFs, then it would help users to find a comment to this effect in the documentation: https://manual.calibre-ebook.com/generated/en/ebook-convert.html#cmdoption-ebook-convert-pdf-output-pdf-hyphenate

Revision history for this message
jimbojw (jimbojw) wrote :

Is it possible to use plugins with ebook-convert, or only through the calibre GUI?

Revision history for this message
Kovid Goyal (kovid) wrote :

Depends on the plugin, some implement command line interfaces, some do
not.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Won't Fix → Fix Released
Revision history for this message
jimbojw (jimbojw) wrote :

Using CALIBRE_DEVELOP_FROM, I updated to git HEAD and tried to run this, but I'm getting a Python error that ends with this line:

IOError: [Errno 2] No such file or directory: u'/home/jimbo/checkout/calibre/resources/hyphenation/locales.json'

Looking on github, there does not appear to be a 'hyphenation' directory under the 'resources' dir at all: https://github.com/kovidgoyal/calibre/tree/master/resources

Are there special steps necessary to acquire the locales.json file?

Revision history for this message
jimbojw (jimbojw) wrote :

Update: I installed v. 4.5 just now, and that works without CALIBRE_DEVELOP_FROM, so the hyphenate/locales.json must be included in the build process.

Revision history for this message
jimbojw (jimbojw) wrote :

Sorry, by 'works' I mean that it's able to run to completion without error, but I'm not seeing any hyphenated words when converting the HTML I attached above.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1854349

You need to wait for the next reease or build calibre from source.
CALIBRE_DEVELOP_FROM will not work for this, since it requires native
code changes.

Revision history for this message
Eli Schwartz (eschwartz) wrote : Re: [Bug 1854349] Re: pdf-hyphenate no longer hyphenating pdfs

The feature was implemented in git master, after the 4.5 release, and it
requires a shared library, a new C module extension in calibre's
codebase, various python changes, and new content in the resources/
directory which is not checked into git (because it vendors a collection
of hyphenation dictionaries and creates a json file describing them).

You cannot obtain the feature using CALIBRE_DEVELOP_FROM, because that
method only works to obtain python-only updates.

Instructions for building from source are in
https://github.com/kovidgoyal/calibre/blob/master/INSTALL.rst

But you are on your own in carrying this out -- I'm not sure how to do
any of that on debian-based distributions. You'll probably have to
install various header packages, for example.

Users of the Arch Linux distribution could use my calibre-git build
recipe to trivially build calibre from source, using the latest git version.

Or you could wait for 4.6.0 to be released with the required binary changes.

Revision history for this message
jimbojw (jimbojw) wrote :

Thanks for clarifying. I will wait for the 4.6 release to use this feature. 👍

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.