$ 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.
## 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
- FastAPI API that receives the PDF, runs Calibre's ebook-convert and returns the EPUB
- Rate limiting per IP, a cap on simultaneous conversions, timeout and upload size validation
- Randomly named temporary files, deleted after the response and in a periodic cleanup
- HTML, CSS and JavaScript front end with a file queue, drag and drop and server status
- Split deployment: pages on GitHub Pages and the Docker API on Render
## Stack and languages
## Other projects
- GestaoComercialDesktop system for stores that sell products and also service their customers' equipment. First deployed at a toner, printer and stationery store.
- GestaoModaSales and inventory for clothing stores: keyboard-driven POS, size and color grid, store credit, exchanges, cash register and 22 reports. Rebuilt in .NET 8 on top of GestaoComercial.
- ProjetoOficinaThe system that started the family: work orders, customers and vehicles for auto repair shops.
- CriadorInstaladorA desktop tool that builds the .msi installer for a Windows Forms system, with Portuguese setup screens and a shared data folder.
- LionFinancePersonal finance API in ASP.NET Core organized in layers: Domain, Application, Infrastructure and API. Work in progress.