Why are words split with hyphens after converting a PDF?
Updated:
Words come out split as "conver- sion" because the PDF hyphenated them at the end of a printed line and the converter copied the line break and the hyphen as they were. A converter has to rejoin those words while keeping real hyphenated compounds such as "well-known" intact.
Fixed layout vs. reflowable text


Where the hyphen comes from
Typesetting software splits long words at line ends to keep the right margin even. In the PDF that split is frozen: the first half ends one line with a hyphen and the second half starts the next. On an e-reader the lines are different, so the hyphen lands in the middle of a line.
Some PDFs mark that hyphen as a soft, line-break-only hyphen; others store it as an ordinary hyphen character, which is why simple tools cannot tell the two apart.
How EpubCC rejoins them
- When the PDF itself flags the hyphen as a line-end hyphen, the two halves are joined.
- When a line ends in "-" and the next line starts with a lowercase letter, the word is joined too.
- A hyphen followed by a capital letter or a number is kept, which protects names and ranges.
- The EPUB is then hyphenated again by the e-reader for its own line length, if you turn hyphenation on.
What can still go wrong
A real compound broken exactly at its own hyphen at the end of a line ("state-" / "of-the-art") looks the same as a hyphenated word, so it can be joined as "stateof-the-art". The benchmark counts split and merged words per 1,000 for every engine, so you can see how often this happens on real documents.
Evidence from the benchmark
| Engine | Split words / 1,000 |
|---|---|
| EpubCC engine (EPUB output) | 2.045 |
| EpubCC engine (plain text) | 2.100 |
| pdf_oxide · extract_text | 0.286 |
| pdf_oxide · to_plain_text (XY-cut) | 1.243 |
| pdf_oxide · Markdown | 2.785 |
| PDFium · text().all() | 2.997 |
| OpenDataLoader PDF (local mode) | 0.835 |
| pdftotext (Poppler) | 1.840 |
Fix broken paragraphs and words
Convert up to 5 pages free, no account needed.