You are not logged in.

#1 2021-01-19 19:05:34

jazznuts
Member
Registered: 2020-03-24
Posts: 20

Calibre Fails to Convert to PDF

Calibre fails to convert any format into a PDF. It seems to be an error during the PDF output plugin. The error is as follows:

Creating PDF Output...
Converting input as a text based book...
Could not find QtWebEngineProcess

I have not tried converting to every other format, but the problem seems to be unique to pdf. python-pyqt5, python-pyqt5-webengine, python-pyqt5-sip, and community/python-qtpy are installed with pacman. Py-qt5 and PyQtWebEngine are installed through pip.

Has anybody else experienced this or have a suggestion to resolve it?

EDIT: Just after posting this, I found a bug report about this. It seems that calibre bundles all its dependencies in one binary with the 'official' download and that the one from the arch repo is unable to use some of them for this reason. Installing the binary from the calibre website fixes the problem.

Last edited by jazznuts (2021-01-19 19:16:27)

Offline

#2 2021-01-19 19:27:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,186

Re: Calibre Fails to Convert to PDF

Is the opt dependency poppler installed? Also you must never mix pip installed libraries with system libraries and I'd not be surprised if that's the cause for your issue, install them for the --user / in a virtual environment (..though afaik the default has recently switched within pip but better be sure and explicitly pass the --user flag)

Online

#3 2021-01-19 19:50:01

progandy
Member
Registered: 2012-05-17
Posts: 4,122

Re: Calibre Fails to Convert to PDF

The epub to pdf conversion works perfectly fine for me with the repository packages, so the problem should be somewhere in your setup

ebook-convert test.epub test.pdf

Last edited by progandy (2021-01-19 19:52:06)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-01-20 01:53:58

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,924

Re: Calibre Fails to Convert to PDF

jazznuts wrote:

I have not tried converting to every other format, but the problem seems to be unique to pdf.

PDF is a terrible format to convert from:
https://manual.calibre-ebook.com/faq.ht … s-problems
https://manual.calibre-ebook.com/conver … conversion

The corollary is that it is also a terrible format to convert *to*.

calibre essentially implements PDF output using Qt WebEngine's "print to PDF" functionality. (It is slightly more complicated than that.)

Every other format actually implements the format properly, and thus does not rely on Qt WebEngine. Hence, problems with Qt WebEngine will only manifest for PDF.

jazznuts wrote:

python-pyqt5, python-pyqt5-webengine, python-pyqt5-sip, and community/python-qtpy are installed with pacman. Py-qt5 and PyQtWebEngine are installed through pip.

DO NOT DO THIS!!!

pacman python-pyqt5 conflicts with pip PyQt5, pacman python-pyqt5-webengine conflicts with PyQtWebEngine, and using the pip stuff is hotpatching foreign machine code into the environment of your pacman-installed calibre.

This is the beginning, middle, and end of your problem. It's also the prefix, postscript, footnotes, and companion guide to your problem. It is, in short, a really big problem.

Do not pip install things you already have installed via pacman. They'll fight each other over which one to use, and the human being sitting at the keyboard is the true loser in that fight.

jazznuts wrote:

EDIT: Just after posting this, I found a bug report about this. It seems that calibre bundles all its dependencies in one binary with the 'official' download and that the one from the arch repo is unable to use some of them for this reason. Installing the binary from the calibre website fixes the problem.

I have no idea what bug report you're referring to, but it seems you drastically misunderstood it. calibre only has one set of dependencies, and the binary "official" download and the arch package have different, incompatible copies of each dependency.

Either one works fine. Neither one of them can use the other's copy of the dependencies.

When you installed the binary from the calibre website, that binary no longer used your very broken system python with its conflicting copies of pacman and pip editions of pyqt5.

The isolated binary environment therefore worked correctly, as the distributor intended.

You could get the pacman edition of calibre to also work correctly, as the (arch) distributor intended, but you'd need to remove the pip edition of the Qt bindings...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB