Now I've just installed the official version as described in https://calibre-ebook.com/download_linuxand that version does the conversion without any problems. So the problem must be in the debian package.
I've got exactly the same error (the one with the surrogates not
allowed) with way too many PDFs. Already since months, always using the
newest calibre version in testing.
- Bug#962668: same error Michael Meier
- Bug#962668: same error Norbert Preining
- Bug#962668: same error yokota