b-mozz/reflow
Reflow
Reading PDFs on a phone is miserable. The page is taller than your screen, the text is too small to read, so you zoom in — and now you can't see a whole line, so you scroll left and right after every sentence. It's the kind of small daily annoyance you stop noticing because there's nothing you can do about it.
Reflow takes any PDF and slices each page into wide, short strips — sized like a phone held sideways. You upload the book, get a new PDF back, and read it by swiping from one strip to the next. No zooming, no scrolling, no pinching.
I made it because I read a lot of Bengali books that only exist as scanned PDFs. Apps that "reflow" text only work when the PDF has selectable text underneath, which scanned books don't. Reflow doesn't care — it works on scanned pages, born-digital pages, comics, English, Bengali, Arabic, anything. It looks at where the ink is and cuts between the lines.
It tries to be careful: every cut is nudged up or down to land in the blank space between two lines, so no sentence gets sliced in half.
That's the whole thing. Free, runs in your browser via Hugging Face Spaces, no signup, your PDF never gets stored.
How it's built
Running it yourself
python3 -m pip install -r requirements.txt
python3 -m uvicorn app:app --reloadThen open <http://127.0.0.1:8000>.
There's also a command-line version if you'd rather skip the browser:
python3 cropper.py input.pdf output.pdf -n 3(-n 3 means "3 strips per page" — pick whatever number reads best on your phone.)
