What happens to charts when a PDF becomes an EPUB
Updated:
Charts drawn as vector graphics are not kept: the EpubCC engine keeps raster images but not vector drawings, so a line chart loses its lines and its axis labels turn into loose paragraphs. On the 487-page Economic Report of the President 2024 the text around the charts converts well; the charts themselves do not.
Original and result
Line and bar charts drawn as vector graphics, with axis labels and legends as real text, plus statistical tables and boxes.


Download source PDF Download the sample EPUB
Why charts are lost
A PDF chart is usually not a picture: it is a set of drawing instructions (lines, fills) plus real text for the labels. The engine reads text and raster images. It does not draw vector graphics into an image yet, so what remains is the text of the chart without the chart.
For a book where charts matter, the PDF is still the better format for those pages. We would rather say so than ship an EPUB with empty figures and call it complete.
What does convert well
The running text: paragraphs joined across pages, running heads removed (margin leak 0.000 in the benchmark against 1.000 for PDFium and pdf_oxide), footnotes linked, and 26 chapters from the PDF outline.
Source and licence
- Document
- Economic Report of the President 2024
- Licence
- Public domain (work of the U.S. Government)
- Pages
- 487
- Traits
- text PDF, book, tables, charts, boxes, footnotes, long
Economic Report of the President, March 2024, together with the Annual Report of the Council of Economic Advisers, 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 33–34 for the images and the sample EPUB.
- Benchmark figures: the published run of 2026-11-03 (engine commit c953279).
- 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
- 487
- Time
- 4.9 s
- Peak memory
- 179 MB
- Chapters
- 26, from the PDF outline
- Raster images kept
- 69
- Vector charts kept
- 0
Quality warnings the engine showed:
- 9 pages look scanned (a full-page image and no selectable text) and are left out: 3, 5, 7, 11, 13, 15, 391, 407 and 487.
- Some characters cannot be recovered from the PDF (fonts without a Unicode table) and appear as «�»: pages 413 to 487.
| Engine | Unmapped glyphs / 1,000 |
|---|---|
| EpubCC engine (EPUB output) | 78.461 |
| EpubCC engine (plain text) | 77.443 |
| pdf_oxide · extract_text | 7.527 |
| pdf_oxide · to_plain_text (XY-cut) | 7.527 |
| pdf_oxide · Markdown | 4.068 |
| PDFium · text().all() | 78.261 |
| OpenDataLoader PDF (local mode) | 0.000 |
| pdftotext (Poppler) | 83.436 |
Limitations we observed
- Vector charts are lost. Only raster pieces survive (here, the grey recession bands), and the axis labels, legend and sources become separate short paragraphs.
- Statistical tables are written as text in reading order, not rebuilt as tables.
- The statistical tables at the end (pages 413 onwards) use a font without a Unicode map: those characters come out as «�» and the engine warns about them (78 per 1,000 characters on the whole document). OpenDataLoader reports 0 here.
- 9 pages are full-page images (covers and separators) and are left out, with a warning.
- There is no independent reference text for this document, so the table measures unmapped characters, not text quality.