Instruction to Setup conda env create -f environment.yml or pip install -r requirements.txt source activate epub Epub2pdf python epub2pdf.py "{filepath}" It will generate {filename}.pdf in current directory Mobi2PDf python mobi2pdf.pf "{filepath}" It will generate {filename}.pdf in current directory Known Bugs Pdf Outline issues. page change for each chapter. How it works [Epub] Epub is zipped file containing xhtml and metadata. So I used weasyprint to convert xhtml to pdf. But how to know which html to add first. That information is contained in *.ncx inside epub bundle. BS4 is used to read ncx file. How it works [Mobi] Kindle unpack to extract data. Weasyprint to convert html to pdf. Credits KindleUnpack Weasyprint