Is there any CLI tool, that can convert a (Mobipocket eBook) PRC file to a PDF?
I Googled on it but all I found was about converting doc(x)/HTML/series of images to pdf.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityIs there any CLI tool, that can convert a (Mobipocket eBook) PRC file to a PDF?
I Googled on it but all I found was about converting doc(x)/HTML/series of images to pdf.
I just tested ebook-convert
from Calibre, and it runs completely without X11 from the commandline. Of course the package as a whole depends on X11 and other GUI libraries. If you don't want to install those (or if you don't want to use dpkg --force-depends -i ...
, and then manually sort out what you still need), the only way is to get the source, figure out what parts you need, and install those.
There's also wkhtmltopdf
, but again this relies on Qt libraries to do the rendering, and I'm nor sure how well it works with ebooks: I didn't try, and you'll have to unpack the PRC file first.
If you want to render graphics (and converting HTML into a PDF means you have to render graphics, you need to do glyph positioning) some kind of graphics libraries are unavoidable ...
calibre
via command line, though I haven't tried this myself. PRC/EPUB/AZW is basically a bunch of HTML files in a compressed archieve, so you do need to render this HTML somehow. – dirkt Sep 24 '17 at 6:18