marqius / pdftoepub
Turn print PDFs into reflowable EPUB 3, HTML or Markdown: chapters, notes and page numbers kept.
Requires
- php: >=7.4
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-12-04 04:46:45 UTC
README
Turn the PDFs books were printed from back into reflowable EPUB 3, clean HTML or Markdown, on your own computer. Chapters, paragraphs that run across page turns, italics, lists, tables, footnotes, pictures and the printed page numbers come back as the book was set.
pdftoepub book.pdf
That makes book.epub, beside the PDF.
This is a preview (0.1.0-beta.1). It has been measured on books printed by marqius itself (the figures). Try it on yours and tell us how it reads: hello@marqius.com.
Install · Your first e-book · What comes back · How good is it? · Licence · Questions
Install
| Your tool | Install | Then |
|---|---|---|
| npm | npm install -g marqius-pdftoepub |
pdftoepub book.pdf (or npx marqius-pdftoepub book.pdf) |
| pip | pip install marqius-pdftoepub |
pdftoepub book.pdf |
| RubyGems | gem install marqius-pdftoepub --pre |
pdftoepub book.pdf |
| Cargo | cargo install marqius-pdftoepub --version 0.1.0-beta.1 |
pdftoepub book.pdf |
| Composer | composer require marqius/pdftoepub:^0.1@beta |
vendor/bin/pdftoepub book.pdf |
| .NET | dotnet tool install -g Marqius.PdfToEpub --prerelease |
pdftoepub book.pdf |
| Homebrew | brew install marqiushq/tap/marqius-pdftoepub |
pdftoepub book.pdf |
| Scoop | scoop bucket add marqius https://github.com/marqiushq/scoop-bucket then scoop install marqius/marqius-pdftoepub |
pdftoepub book.pdf |
| winget | winget install Marqius.PdfToEpub |
pdftoepub book.pdf |
| Chocolatey | choco install marqius-pdftoepub --pre |
pdftoepub book.pdf |
| Docker | docker pull marqius/pdftoepub |
docker run --rm -v "$PWD:/data" marqius/pdftoepub book.pdf |
| apt, dnf, apk | packages.marqius.com | pdftoepub book.pdf |
| Download | the latest release: one file for Linux (x86-64, ARM64), macOS (Apple silicon) or Windows (x86-64) |
Every line installs the same program. It is one file with nothing else to install.
Your first e-book
pdftoepub book.pdf # book.epub, beside the PDF pdftoepub book.pdf -o book.html # one web page, its pictures in book_files/ pdftoepub book.pdf -o book.md # Markdown pdftoepub shelf/*.pdf --out ebooks/ # a whole shelf, one book after another
It says what it found:
pdftoepub: book.epub: EPUB 3, 62 chapter(s), 2076 paragraph(s), 155 picture(s), the numbers of 476 printed page(s); 486 pages in 0.74 s (1.5 ms a page)
Add --json for one line of JSON a book, for your scripts.
What comes back
- Chapters and headings, and the e-book's contents made from them
- Paragraphs whole, joined across page turns, with words broken at line ends put back together
- The look of the words: italics, bold, small capitals, underline, strike-through, colour
- Lists (lists inside lists too), tables whose cells wrap, with their head rows, and boxes
- Footnotes that open where they are called
- Pictures with their captions, verse line by line, and scene breaks
- The printed page numbers, as the e-book's page list, so a reader can follow the print edition
Running heads, page numbers in the margins and other furniture of the printed page are left out.
How good is it?
Measured on 200 books: ten classic novels, each printed by marqius in twenty book designs, then read back and compared with the original text.
| Came back as printed | |
|---|---|
| Chapters | 100% |
| Paragraphs | 98.7% |
| Italics | 99.97% |
| Words | 99.99% |
| EPUBCheck | no errors, on all 200 e-books |
Speed: about 1.1 ms a page. A 486-page novel with 155 pictures takes under a second on a laptop.
These are books marqius printed itself. A test set of other publishers' PDFs is under way, and its figures will be published when it is done.
Licence
Marqius PDF to EPUB is commercial software from Simple AI LLC, licensed, not sold.
- Evaluate it on 5 books. In each evaluation copy, about half the printed pages, chosen at random, say "Intentionally left blank", and a last page says it is an evaluation copy.
- A licence for a book makes that book's e-book whole, in every format, as often as you convert it. See the plans.
- To use a licence, run
pdftoepub licence add <licence>, or setMARQIUS_LICENCEto the licence, or to a file or folder that holds licences.
pdftoepub licence shows the evaluation's books and your licences.
Questions
How do I convert a PDF to EPUB from the command line?
Install it with any line above, then run pdftoepub book.pdf. The EPUB is written beside the PDF. -o names the file; .html and .md give a web page or Markdown instead.
Does it keep footnotes, tables and page numbers? Yes. Footnotes come back as notes that open where they are called, tables keep their rows and head rows, and the printed page numbers become the e-book's page list.
Is my book uploaded anywhere? No. It runs on your own computer or server and sends nothing. The only download it ever makes is the reading model for scanned pages, the first time a scanned page needs it.
Which PDFs does it read best? PDFs made for print, with real text inside. Scanned pages are read with built-in OCR, which this preview does not yet read as well.
Is the e-book valid EPUB 3? Every e-book in the test set passed EPUBCheck with no errors.
Does it make accessible e-books? It gives an e-book the structure accessibility is built on: real headings and contents, notes that link both ways, pictures with their captions, and the printed page numbers. A checker cannot judge everything that matters to readers, so have a person review the result before you call it accessible.
Can I convert a whole backlist?
Yes: pdftoepub shelf/*.pdf --out ebooks/ converts every PDF in turn. Each book needs its own licence after the evaluation.
How do I check a download is genuine?
Every program is built on GitHub with its build provenance and a software bill of materials. Check a file with gh attestation verify marqius-pdftoepub-linux-x86_64 -R marqiushq/marqius-pdftoepub.
More
- Questions and licences: hello@marqius.com
- marqius.com/pdf-to-epub
Marqius PDF to EPUB is proprietary software from Simple AI LLC.