Skip to content
~/alex-matias

$ cd ~/repos/pdf-para-epub

pdf-para-epub

Online PDF to EPUB converter for reading on Kindle, Kobo and reading apps. Static front end on GitHub Pages and a Python API running Calibre in a Docker container.

PythonFastAPIDockerCalibreJavaScript

## About the project

pdf-para-epub is an online converter from PDF to EPUB, the format that adapts to Kindle, Kobo and reading app screens. You pick one or more PDFs, convert them and download the EPUB, no login required.

The conversion is done by Calibre (ebook-convert), which needs a server with the system binaries. So the project has two parts: the pages, in plain HTML, CSS and JavaScript, hosted on GitHub Pages; and a Python API with FastAPI, packaged in Docker with Calibre installed and deployed on Render.

The API is built to withstand public use: upload size checked in the header and while receiving, rate limiting per IP, a cap on simultaneous conversions, a timeout and a second attempt without the heuristic options when the first one fails. Files live in randomly named temporary folders and are deleted after the response and in a periodic cleanup.

Since the free server sleeps when idle, the page pings it to wake it up as soon as it opens and shows its status (connecting, waking up, online). The site also has guides on digital reading, such as sending EPUB to a Kindle and why some PDFs don't convert well.

## Highlights

## Stack and languages

PythonFastAPIDockerCalibreJavaScript

## Other projects