back
89 comments
The comments are not mentioning [Pandoc](https://pandoc.org/) as an alternative yet (missing mobi I think).
If you're specifically converting eBooks, Calibre comes with command line conversion tools that produce better results than pandoc.
Calibre also has plugins that help ensure stuff like Goodreads works if you’re sending non Kindle books to a Kindle device.
It doesn’t run on iPad or iPhone… which is the niche these sites fill
I have found the best tools for this to be the free Kindle Previewer ( https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1003018... ) and Calibre. The Calibre editor is useful for cleaning up messed up EPUB files that don't work in the Kindle Previewer.
Calibre runs great in a container too. As always, the Linuxserver image is great. The Docker Package on Synology made this very easy when I was new to Docker some years ago, and it hasn’t been touched since the initial install, it just works.

https://github.com/linuxserver/docker-calibre

Shameless plug and this is only loosely related: Over the last holiday season I wrote a backend (written in Go and running on App Engine) to convert http url into epub. The frontend is a telegram bot that sends the epub to your reMarkable account directly, but it also has rest api to download the epub file: https://github.com/fishy/url2epub/blob/main/REST.md
Related to that, I made an app in Glitch to send RSS feeds as ePub to remarkable. It’s great it has an API. https://glitch.com/edit/#!/remarkable-sync-app
I want ePub to FB2. Because FB2 books are rendered with better readable fonts on my PockerBook reader.

I have no problems using Calibre or PanDoc for this task though. Obviously the problem emerges when you want to do the job without installing anything.

Why would you convert an epub to pdf? There is no ebook reader, other than kindles (for which the proper conversion would be to kf8), that can't handle epubs.
> Why would you convert an epub to pdf?

On the contrary! Why would you ever keep an epub file around? If somehow an epub file finds its way into my computer, the first thing that I need to do is to convert it to pdf to be able to read it with a reasonable viewer (or print it!). After the convesion, I delete the epub file; I really dislike this format and the associated software.

If you print your ebooks for some reason rather than buy used copies, granted you have to convert to pdf for that.

Why prefer an epub...

They have flowed text, and ebook readers let you customize font and font size so that the book's text adapts to you rather than you adapting to a particular combination of publisher quirks and zoom necessary to fit in a particular device's or app's viewable size.

They're generally smaller files.

And if there's something about the epub you don't like, you can actually fix it.

If a book is available in both PDF and epub formats, it's a reader's prerogative to pick the one they want, and there are specific types of books where PDFs might be preferable. However, if there's no original pdf, what is the objective of converting an epub to pdf in order to read it on a computer? Whatever you think you're accomplishing, I think you're mistaken. You end up with a pdf that looks exactly like how a typical ereader would display the epub. Minus the flowed text and font customizability, and probably with poorer navigation as well.

Haha, I'm the opposite, i usually see a long text and wish I had it as epub.
Where are you downloading content as epubs that you can't get as PDF?
Because all PC epub readers suck (bad default margins, paddings, fonts, bad font rendering, lack of visual pages/sheets, etc)

I've tried to like them, customize them, fix their problems, etc but to no avail.

when I check the download stats for all my books, PDF downloads are more popular than all other formats.

I prefer epubs too, but apparently readers really like PDFs...

PDFs retain their formatting better and are much more readily accessible across devices, except for the smallest screens.
Send my public domain book to my grandma who doesn't know how to handle an epub? Convert it because it is easier to print as a .pdf with my particular setup?

There are all kinds of potential use cases for users of differing levels of technical sophistication.

Why wouldn't you provide an option to convert to .pdf?

Nice tool. I thought kindle files were mobi? Any difference?
> A file with the .MOBI file extension is used for storing eBooks. It was originally a Mobipocket Reader format but has since been adopted by several different readers as well. Amazon purchased Mobipocket in 2005, and later discontinued the MOBI format in 2011.

> The current Kindle formats (AZW3, KF8, and KFX) are based on MOBI and is a proprietary format exclusively used on Kindle devices. And, in fact, you can still open files with the MOBI format directly on your Kindle

https://www.howtogeek.com/360419/what-is-a-mobi-file/

If you want to write a Kindle book, checkout my book, Publish Your eBook by Joel Dare.

https://www.amazon.com/Publish-Kindle-write-ebook-software-e...

The ones with DRM are .azw, basically an encrypted .mobi. Calibre is your friend. https://calibre-ebook.com/
And (another fun fact) if you want to email EPUBs to your kindle, just make the file extension .png (!?) and it will be automatically converted, without the need for Calibre.
Kindle has jumped around in formats over the years. It's been AZW (which is basically mobi), AZW3, and now KFX. I assume that KFX is what this tool is calling "Kindle".
It currently does AZW3 for kindle, but I will add in the sub option to choose from those three formats.
There are a few "kindle formats"; the most basic of which are just mobi files. Generate a mobi file and any kindle should be able to load it fine.
I'd think I'll stick with the tried and true `ebook-convert` tool from Calibre, and pandoc. There's no sense uploading your documents to a third party when that's not necessary.
Can I use this to change my purchased kindle books into ebooks for all devices?

I’m somewhat tech literate, but pretty ignorant about e-book file types.

You cannot -- Kindle ebooks are in a format called KFX (or AZW/mobi or AZW3, depending on when you got them), which this tool doesn't support as an input.

If you wanted to do that, I'd just use Calibre, which has really comprehensive format conversion abilities: https://calibre-ebook.com

Most Kindle ebooks have DRM as well, which I think is currently hard to remove -- there's a plugin for calibre that you could try. Some publishers don't apply it, though, so maybe.

Calibre is great, but IMO it’s the wrong approach for this particular conversion. Use KindleUnpack instead, which is close to lossless.

https://github.com/kevinhendricks/KindleUnpack

This is a fantastic way to read books published by Tor on multiple devices. Now if only Tor would sell the ePub files on their website. (Tor eBooks are not DRMed.)

Removing drm from .azw3 is easy. [0] All you need is the ID of your kindle, since it's tied to your device.

There is also a plugin for Calibre, although I haven't tested this myself. I'm not sure if it requires a device ID or not. [1]

[0]: https://alexwlchan.net/2019/08/removing-the-drm-from-my-kind...

[1]: https://github.com/apprenticeharper/DeDRM_tools/wiki/Exactly...

I'm an author on Amazon and wonder: Is this also true if I switch off DRM for my books on Amazon? Could someone clarify this? I publish all my books without DRM.
In case the question isn't about the format but about the DRM, Apprentice Alf has a wonderful plugin for Calibre: https://apprenticealf.wordpress.com
And unfortunately I don't think the DRM for the latest format (KFX) has been cracked yet. The best anybody can do is work around it by getting Amazon to send you the book in an older Kindle format but then you lose all the nice things that you get with KFX.
I haven't tried with this tool yet but I would be surprised if so, purchased Kindle books usually have quite a bit of DRM involved.

There are methods to strip it using old versions of the desktop kindle app that have exploits, but it's not overly easy to do if you're not familiar with stuff like that.

Search for "Apprentice Alf" for a DRM stripping plugin for Calibre. This is how I liberated my kindle library. Once you've stripped the DRM, you can freely convert them to epub.
No, your Kindle books are AZW3 or such, and they also have DRM applied.

If you strip the DRM, with tools which are common to find on the net, you can then use Calibre to convert them to EPUB, which is a very common format.

I would be interested in a tool that converts a list of html files into a single pdf, with consistent formatting.
Well, two epubs gave a "something went wrong" when converting to HTML, which is the only output I'm really curious about. I got one conversion to PDF to work, then went back to try html, and now I've got to wait an hour... :(
this should be fixed
Thanks. Got an HTML doc through.

FYI, (at least in my document) quotes and apostrophes and em-dashes don't work properly.

Would you mind to tell us if your paid api service has some success ? Thanks !
How is this monetised?
Nice tool but ack!, yet another this file format to that file format conversion tool.

A book is not a file. It never will be.

I know half the unixy nutcases won't agree with anything normal but in reality the world will continue to buy dead-tree books because no real consumer believes or wants these stupid files. Or will pay for it. Meh, the trash.

There is a growing market for ebooks. I have a lot of friends who are not tech literate who prefer buying on their kindle for the convenience of having one small device rather than shelves of paper.

Both markets will continue to exist for a long time for different reasons and readers.

> ...for the convenience of having one small device rather than shelves of paper.

Yeah, that’s why people moved away from cassettes to Youtube. I have a lot of friends who gave their Kindles away and are back into paperbacks and/or the iPads.

Preferences vary. I only buy and read ebooks, as they're vastly more convenient and somewhat cheaper into the bargain.