I'll tell you clearly and loudly: I don't like Calibre! So, how can I convert PDF to ePUB without it?
6 Answers
We know you don't like Calibre... but have you tried its CLI conversion tool?
The Calibre install provides the command ebook-convert
that will handle what you want, and there's no need to run Calibre.
ebook-convert file.pdf file.epub
is all that's required.
If the output looks a little wrong - try this
ebook-convert file.pdf file.epub --enable-heuristics
It will try a "smart" way to convert. Not perfect, but can work well in most conversions.
LibreOffice has an epub exporter extension, so you can install the LibreOffice PDF importer extension, import your PDF, and then export to epub.

- 51,541
Have a look at www.convertfiles.com, you can easily convert .pdf
to .epub
using their free online conversion tool.

- 3,899
This is not a direct answer to the question, but for people who want to read PDFs on an e-reader and are finding it cumbersome, one solution may be to crop the margins of the PDF, and read in landscape mode. That works acceptably well for me on my e-reader in any case. There are many PDF croppers out there. Just search for "pdf crop" or "pdf trim".

- 141
I've managed to cut out ebook-convert
from Calibre (which, for who knows what reasons, requires Qt
for image manipulation) and got a command-line only interface for it, to be able to use the tool on a headless/server machine.
The steps involved extracting these directories from the calibre
package (deb, rpm, whatever):
/usr/bin/ebook-convert
/usr/lib/calibre
/usr/share/calibre
Installing some missing python modules (which you figure out by running the convert command ebook-convert inputfile outputfile
), in my case:
python3-msgpack
python3-dateutil
python3-lxml
python3-css-parser
python3-pil
etc.
I also had to specify a command line option --mobi-keep-original-images
, since I wanted to convert epub
to mobi
format using: ebook-convert ~/test.epub ~/test.mobi --mobi-keep-original-images
The last part was the most painful, since it involved modifying some of the python util scripts, which use Qt
(which then requires some X11 libs) for image manipulation and we want to avoid that on a server/headless machine. Basically, I removed Qt imports and fixed the remaining errors in the scripts by making those functions empty (or throw an exception) in these 2 files (in my case):
/usr/lib/calibre/calibre/utils/img.py
/usr/lib/calibre/calibre/ebooks/conversion/plugins/mobi_output.py
In short, the conversion tool only uses Qt
for image manipulation operations. If you can live with unmodified images from the original book that you are converting and don't need to compress/resize those images, then you're lucky, since you can avoid using Qt/X11.
Note to calibre
developers: Why did you not use standard image manipulation libraries? Why choose a heavy GUI-oriented framework (like Qt) for simple image operations? Quite a great package (calibre) with such a poor decision, in my opinion...

- 271
- 1
- 13
2epub.com - the same online converter with batch processing and output compression files

- 523
--enable-heuristics
flag does not work well with those. – zakkak Nov 20 '14 at 15:55cd
ing to the directory:find ./ -iname "*pdf" -type f | while read f; do echo -e "\e[1mConverting file $f \e[0m" ; ebook-convert "$f" "${f%.pdf}.epub" --enable-heuristics ; done
– Wilf Apr 24 '15 at 12:14