- conda env create -f environment.yml or pip install -r requirements.txt
- source activate epub
- python epub2pdf.py "{filepath}"
- It will generate {filename}.pdf in current directory
- python mobi2pdf.pf "{filepath}"
- It will generate {filename}.pdf in current directory
- Pdf Outline issues.
- page change for each chapter.
- 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.
- Kindle unpack to extract data.
- Weasyprint to convert html to pdf.