Converting a government report with footnotes to EPUB
Updated:
Government reports put footnotes at the bottom of almost every page and repeat the report number in every footer. On a 58-page GAO report the EpubCC engine found 50 footnotes, linked 47 to their calls and removed the footers, with no margin text left in the EPUB.
Original and result
Footnotes on most pages, a running footer with page number and report number, a letterhead, figures and tables, and appendices with agency comment letters.


Download source PDF Download the sample EPUB
How footnotes are found
A block is a footnote when it is smaller than the body text, sits in the bottom half of the page below body text, and starts with a marker. Superscripts in the body with the same label become links to the note, and the note links back.
In the EPUB, the notes are placed at the end of their chapter as EPUB footnotes, so reading apps that support them open the note in a pop-up.
What the sample shows
Pages 6 and 7: the letter to Congress with footnotes 1 to 3. The paragraph that crosses the page break is joined, the footer «Page 1 · GAO-24-106219 Federal Contracting» is gone, and the calls are links.
Source and licence
- Document
- GAO-24-106219, Federal Contracting: Agencies Can Better Monitor E-Verify Compliance (GAO)
- Licence
- Public domain (work of the U.S. Government; third-party images may need permission)
- Pages
- 58
- Traits
- text PDF, one column, footnotes, repeated headers, figures, tables
U.S. Government Accountability Office, GAO-24-106219, “Federal Contracting: Agencies Can Better Monitor E-Verify Compliance”, October 2023. A work of the U.S. Government, not subject to copyright in the U.S.; GAO notes that third-party images in its reports may need separate permission.
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 6–7 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
- 58
- Time
- 0.73 s
- Peak memory
- 147 MB
- Footnotes found
- 50
- Footnote calls linked
- 47
- Running headers and footers removed
- 69
- Chapters
- 8, from the PDF outline
- Images kept
- 18
- Quality warnings
- none
Benchmark run of 2026-11-04, not yet part of the published benchmark.
| Engine | Margin leak |
|---|---|
| EpubCC engine (EPUB output) | 0.000 |
| EpubCC engine (plain text) | 0.981 |
| pdf_oxide · extract_text | 1.000 |
| pdf_oxide · to_plain_text (XY-cut) | 1.000 |
| pdf_oxide · Markdown | 0.077 |
| PDFium · text().all() | 1.000 |
| OpenDataLoader PDF (local mode) | 0.000 |
| pdftotext (Poppler) | 0.000 |
Limitations we observed
- 3 of the 50 footnotes were not linked to a call: they stay as notes at the end of the chapter without a link back.
- A hyphen that is part of a word is lost when it falls at the end of a line before a capital letter: «E-» + «Verify» became «EVerify» (visible in the sample), «indefinite-» + «delivery» became «indefinitedelivery».
- Table cells and figure labels are written as text in reading order, not rebuilt as tables.
- The address block of the letterhead becomes ordinary short paragraphs.
- GAO publishes no HTML or text version, so there is no independent reference text: the table measures margin leak, not text quality.