1

I want to convert a few .epub files into .pdf files (no merge, just convert file_1.epub to file_1.pdf, file_2.epub to file_2.pdf, ...) and was wondering if there was a way to streamline the process using the Mac command line.

Heard about the Calibre application but this is not what I am looking for as I want to use the command line.

5
  • 1
    The reason people say "use calibre" is because going from a DRM and proprietary format like EPUB to PDF is substantially more than a single line command like "epub2pdf file1.epub file2.pdf". Calibre has a "server" option with a CLI that allow you to do these things, but with all the required libraries behind it. Have you explored that option? – Allan Apr 29 '20 at 11:19
  • 1
    See if any of the answers here help you. – Nimesh Neema Apr 29 '20 at 11:20
  • 1
    @NimeshNeema - The first 3 answers are about Calibre and the very next one is hosted on Softpedia which is a great place to acquire malware. The next ones are pandoc which is closer but more for academic things (bibliographies, citations, etc.) and from what I've read in my cursory look, it doesn't handle DRM. – Allan Apr 29 '20 at 11:24
  • Thanks for shedding light. I wasn't aware of these things. – Nimesh Neema Apr 29 '20 at 11:37
  • @NimeshNeema Good catch Nimesh, the first answer there describes a command line solution :-) – nohillside Apr 29 '20 at 12:14
5

Calibre has a command line interface, see this part of the manual. Basically you should be able to add /Applications/calibre.app/Contents/MacOS to your PATH (or symlink the binaries there into /usr/local/bin) and then run

ebook-convert input_file output_file
1
  • The commands to create a symlink ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin/ebook-convert – Sam Kah Chiin Jun 22 at 13:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .