Skip to content
Use case

Line-numbered PDFs (bills, pleadings): not handled yet

Updated:

Line numbers in the margin are not handled yet: on a 50-page U.S. Senate bill the EpubCC engine writes the numbers 1 to 24 as a stack of short paragraphs before each page's text and splits about 24 words per 1,000. Other engines do worse on continuity (8-gram recall 0.09 to 0.51 against our 0.559), but none gives a clean result.

Try 5 pages free

Original and result

Every line numbered 1 to 24 in the left margin, a page number at the top, hyphenated words at the end of short lines, and deep indentation for each level of the bill.

Original PDF
Page of the original PDF
Result (EPUB, as a reader shows it)
The same passage in the converted EPUB

Download source PDF Download the sample EPUB

Why we publish a case that fails

Bills, court pleadings and transcripts often number every line. A converter that silently keeps those numbers produces an EPUB that is hard to read, and you should know that before uploading a 500-page filing. Removing margin line numbers is on the list of engine fixes; this page will be regenerated when it works.

Source and licence

Document
S. 1409, Kids Online Safety Act, introduced in the Senate (GPO)
Licence
Public domain (work of the U.S. Government)
Pages
50
Traits
text PDF, one column, line numbers, legal text

S. 1409 (118th Congress), Kids Online Safety Act, as introduced in the Senate on 2 May 2023, U.S. Government Publishing Office (govinfo.gov). A work of the U.S. Government, in the public domain.

Settings used

  • Engine: EpubCC engine at commit 3b74b26, the binary that generated the images and the sample (2026-11-04).
  • Pages: the whole document for the figures; pages 3–4 for the images and the sample EPUB.
  • Benchmark figures: a run of 2026-11-04 with the same binary, every engine on the whole document; this document is not yet part of the published benchmark.
  • Options: none. The engine has no per-document settings yet; the same defaults apply to every file.

Validation and results

EPUBCheck EPUBCheck on our EPUB: 0 errors, 0 warnings.

EPUBCheck 5.4.0 on the downloadable sample: 0 errors, 0 warnings (checked 2026-11-04).

Pages
50
Time
0.05 s
Peak memory
20 MB
Chapters
none detected
Split words / 1,000
23.6
Quality warnings
1

Quality warnings the engine showed:

  • No chapters were detected: the book stays in a single section.

Benchmark run of 2026-11-04, not yet part of the published benchmark.

8-gram recall · Like 4-gram recall with 8 words: drops when reading order or line joins break sentences (continuity). Methodology
Engine8-gram recall
EpubCC engine (EPUB output)0.559
EpubCC engine (plain text)0.558
pdf_oxide · extract_text0.184
pdf_oxide · to_plain_text (XY-cut)0.089
pdf_oxide · Markdown0.511
PDFium · text().all()0.088
OpenDataLoader PDF (local mode)0.088
pdftotext (Poppler)0.101

Limitations we observed

  • The line numbers are kept as a run of one-number paragraphs at the start of each page instead of being removed.
  • Words hyphenated at a line end are sometimes split with a space instead of joined («serv ice», «sub ject»): 23.6 split words per 1,000 in our EPUB.
  • Indentation levels ((A), (i), (I)) are flattened; the outline of the bill is not rebuilt.
  • No chapters are detected, and the engine warns about it.
  • Our 8-gram recall (0.559) is the highest of the engines measured, which says more about how hard this layout is than about the quality of our result.

Convert a similar PDF

Share LinkedIn X Reddit Email