Field guide / eBook conversion

Convert a text PDF to EPUB

Determine whether a PDF has usable text, understand reading-order limits, create reflowable EPUB metadata and verify the converted book on an e-reader.

QUICK ANSWER

A text-based, single-column PDF can become a useful reflowable EPUB by extracting its text layer and packaging the result with title, author, language and navigation metadata. Scanned pages need OCR first, while tables, columns and fixed visual layouts usually need manual editorial cleanup.

PDF sources do not convert equally well
PDF sourceExpected resultPreparation
Single-column manuscriptUsually good reading flowRemove repeated headers and review paragraphs
Two-column reportReading order may mixExtract and edit text before packaging
Scanned bookNo text without OCRRun language-appropriate OCR and proofread
Image-heavy fixed layoutPoor fit for reflowKeep PDF or rebuild the publication

PDF fixes positions; EPUB reconstructs reading order

A PDF page can place individual characters, lines, images and vector objects at exact coordinates. EPUB instead presents a sequence of XHTML content that a reading app reflows for the screen, font size and reader preferences. Conversion cannot preserve fixed page geometry and produce genuinely responsive text at the same time.

For a novel, essay or manuscript, losing the original page positions is often desirable because lines become comfortable on a phone or e-reader. For a form, illustrated textbook, sheet music or catalogue, fixed placement may carry meaning. Those documents are usually better kept as PDF or rebuilt from the original source rather than automatically reflowed.

Consider a 120-page novel formatted for 6×9 inch paper. The PDF preserves exact character positions across pages, including page numbers, headers and margins. When converted to EPUB, the text flows continuously without page breaks. A reader on a 6-inch e-ink device might see 15–20 lines per page, while the same EPUB on a phone could show 30–40 lines. The content remains identical, but the visual presentation adapts to the device. This reflow capability is why EPUB excels for novels and why PDF remains essential for documents where layout equals meaning.

EPUB internals in plain words

An EPUB file is actually a ZIP archive containing several key components. The 'container' is the outer ZIP file. Inside, you'll find a 'package' file (usually 'content.opf') that describes the book's structure, metadata and reading order. The 'spine' defines the sequence of XHTML files that make up the main content. Each XHTML file contains the actual text and formatting, while separate CSS files control the visual presentation.

EPUB 3, the current standard, also includes navigation documents for table of contents and landmarks, and may contain JavaScript for interactivity. Unlike PDF's fixed pages, EPUB separates content from presentation, allowing readers to customize the reading experience while preserving the document's structure and meaning.

A typical EPUB 3 file structure looks like this: container.xml (points to content.opf), content.opf (defines metadata, spine and manifest), toc.ncx or toc.xhtml (table of contents), and multiple XHTML files for chapters. The CSS might be 50–100 lines defining font families, line heights and margins. This separation means a single EPUB can adapt to different screen sizes and user preferences without changing the underlying content. For example, a reader might increase font size from 12pt to 18pt, and the EPUB automatically adjusts line breaks and page breaks accordingly.

What validation tools check

Tools like epubcheck examine EPUB files for compliance with the specification. They verify that required files exist, that XML is well-formed, that metadata is complete, and that the spine correctly references content files. Validation ensures the EPUB will open in most reading applications and meets basic quality standards.

Beyond technical validation, human review is essential. Check that chapter breaks make sense in the new flow, that headers and footers don't repeat unnecessarily, and that special characters and non-Latin scripts display correctly. Even valid EPUBs can have poor reading flow if the source text wasn't properly structured.

When validating an EPUB, epubcheck might report 5–10 issues in a typical conversion. Common problems include missing language metadata (prevents proper hyphenation), incorrect spine order (chapter 3 before chapter 2), or malformed XML in XHTML files. Fixing these technical issues usually takes 10–15 minutes. However, the more important validation happens when you actually read the EPUB. Open it in Adobe Digital Editions, Apple Books, and a web-based reader like Readium. Check for: inconsistent chapter numbering, text that runs into margins, or formatting that breaks on certain devices. A technically valid EPUB can still be unusable if the reading flow is poor.

Reading app differences: reflow, fonts and hyphenation

Different e-readers and reading apps implement reflow differently. Some may break lines at word boundaries, while others allow hyphenation. Font support varies, with some devices having limited font choices or substituting system fonts. Hyphenation dictionaries differ by language and app, affecting how words split at line endings.

These differences mean the same EPUB can look and feel different across devices. Test on multiple platforms if possible, or choose widely compatible settings during conversion. For professional publishing, consider generating multiple EPUB versions or using more advanced formatting options that work consistently across readers.

Consider a German novel with long compound words. On a Kindle, the hyphenation might split 'Donaudampfschifffahrtsgesellschaftskapitän' differently than on an Android reader. Some devices use sophisticated hyphenation algorithms that preserve word meaning, while others might split words in awkward places. Font rendering also varies: a serif font might look crisp on an e-ink device but blurry on a low-resolution phone screen. The solution is to test on at least three platforms (desktop, tablet, phone) and adjust CSS properties like 'text-rendering' and 'font-feature-settings' to improve consistency. For example, adding 'font-feature-settings: "kern", "liga";' can improve letter spacing across different renderers.

Cleaning extracted text: headers, footers and page numbers

PDF text extraction often includes unwanted elements like repeated headers, footers and page numbers that disrupt reading flow in EPUB. These elements may appear mid-sentence or at inappropriate places in the reflowed text. Manual editing is often necessary to remove or reposition these elements so they function as proper chapter headings or section dividers.

Search for patterns like 'Page 1', 'Chapter 2' or document titles that appear repeatedly. Consider whether these should be removed entirely, converted to proper heading tags, or placed in a separate navigation document. Cleaning text before packaging improves the reading experience and reduces the need for extensive post-conversion editing.

A practical approach: open the extracted text in a plain text editor and search for 'Page [0-9]+' using a regular expression. In a 300-page novel, you might find 300 instances of page numbers scattered throughout the text. Replace these with paragraph breaks or remove them entirely. For headers like 'Chapter 1' that appear on every page, convert them to proper HTML headings. For example, change 'Chapter 1' followed by a page number to '<h1>Chapter 1</h1>' at the beginning of the chapter content. This transformation takes 30–60 minutes for a typical novel but makes the EPUB readable. Without this cleanup, readers might see 'Page 142' in the middle of a paragraph, breaking immersion.

Building chapter breaks deliberately

PDFs often use page breaks or visual spacing to indicate chapters, but these don't translate directly to EPUB navigation. When converting, identify chapter beginnings and mark them with proper HTML heading tags (h1, h2, etc.). This creates a logical structure that reading apps can use for table of contents and navigation.

For documents without clear chapter markers, consider adding them based on content patterns, section headings or significant breaks in the text flow. Well-structured chapters make the EPUB more usable and help readers navigate long documents. Remember that EPUB readers can jump between chapters, so clear boundaries are more important than precise page alignment.

Here's a step-by-step approach for a manuscript without clear chapter markers: 1) Read through the first 50 pages and identify natural breaks in the narrative flow. 2) Look for changes in scene, time, or perspective that indicate chapter beginnings. 3) Add <h1> tags at these points, creating a clear hierarchy. 4) Verify that each chapter has a unique title that appears in the table of contents. For a 120-page novel, this might result in 12–15 chapters. The benefit is enormous: readers can jump to any chapter with a single tap, and the reading app can display a proper table of contents. Without this structure, the EPUB becomes one long, undifferentiated text block that's difficult to navigate.

Test the PDF text layer before converting

Try selecting a word and searching for a phrase inside the PDF. When both work, the file probably contains a usable text layer. A scan may look like ordinary text but still be one page-sized image. Some scans contain invisible OCR text, so selection can work even when the visible page is photographic.

Use the PDF text extractor to preview reading order before creating the EPUB. Inspect the first pages, a middle section and any page with columns, footnotes or a table. If the text preview is already confused, packaging it as EPUB will not repair the underlying order. Edit the text or return to the source manuscript first.

A practical test: open the PDF and try to select a paragraph of text. If you can highlight individual words and copy them, the text layer is likely intact. Next, search for a unique phrase from the middle of the document. If the search finds the correct location, the text is searchable and therefore extractable. For a 120-page novel, test three sections: page 1 (beginning), page 60 (middle), and page 120 (end). If selection and search work in all three, proceed with conversion. If not, investigate why: perhaps the PDF is a scan, or the text layer is corrupted. In such cases, you might need to return to the source file (like a Word document) or run OCR on the PDF before conversion. This pre-check saves hours of work on documents that can't be properly converted.

Add metadata that reading apps can understand

At minimum, give the converted book a useful title, author and language code. The language helps reading systems choose pronunciation and hyphenation behavior, while a stable title makes the file easier to identify in a library. File Preflight creates a simple EPUB 3 package with navigation and a reflowable XHTML chapter.

Automatic conversion does not create a polished commercial eBook. A publication for distribution may need a cover, chapter-level navigation, semantic landmarks, accessibility review, copyright information and validation against retailer requirements. Treat the generated file as a private reading or editing copy unless it has been reviewed as a publishing project.

Essential metadata includes: title (max 100 characters), author (max 80 characters), language (ISO 639-1 code like 'en' or 'de'), and identifier (ISBN or UUID). For better discoverability, add: publisher, publication date, rights (copyright statement), and subject tags. In File Preflight, this metadata is added during the conversion process. For example, setting the language to 'en-US' ensures that readers use American English hyphenation rules, while 'en-GB' uses British English rules. The difference might seem small, but it affects how words like 'organisation' vs 'organization' are hyphenated. Proper metadata doesn't just make your EPUB look professional—it ensures it behaves correctly across different reading systems.

Verify reflow, characters and rights

Open the EPUB in at least one desktop reader and the device or app where it will actually be used. Change font size and margins to expose hard line endings, missing paragraph breaks or unusually long unbreakable strings. Check non-Latin scripts, punctuation, italics represented as plain text and page headers accidentally repeated inside the body.

Convert only material you created, public-domain material or documents you are authorized to transform. Local processing protects the file from an unnecessary upload; it does not change copyright or license restrictions.

A thorough verification process includes: 1) Open in Adobe Digital Editions (desktop) and test font size changes from 8pt to 24pt. 2) Open on a Kindle device and check for proper chapter navigation. 3) Open in a web browser using Readium and verify that tables and lists format correctly. 4) Search for common problems like '�' replacement characters (indicating encoding issues) or broken hyphenation. 5) Check that all images referenced in the original PDF appear in the correct locations. For a 120-page novel, this verification might take 20–30 minutes but catches 80% of conversion issues. Keep a log of any problems found, noting the page number and nature of the issue. This log becomes your correction checklist for the next conversion attempt.

  • Compare the opening and final paragraphs with the PDF.
  • Search for replacement characters and broken hyphenation.
  • Change the reader font size to test true reflow.
  • Keep the source PDF and note any manual corrections.
  • Test on at least three different reading platforms.
  • Create a correction log for future improvements.

Frequently asked questions

Can I convert a scanned PDF to EPUB?

Only if the PDF has an OCR text layer. Pure image-based scans require OCR processing first. File Preflight's PDF to EPUB tool works best with text-based PDFs.

Will the EPUB retain the original page numbers?

No, EPUB is reflowable and doesn't have fixed page numbers. Page numbers from the PDF are generally removed during conversion as they don't make sense in a reflowable format.

What about tables and columns in converted EPUBs?

Complex layouts may not convert well. Tables can become distorted, and multi-column text may merge into single columns. Manual editing is often needed for professional results.

Can I add a cover image to the converted EPUB?

Yes, most conversion tools allow adding a cover. For File Preflight, the generated EPUB includes basic metadata, but you may need to add a cover separately for a polished result.

Is the converted EPUB accessible for visually impaired readers?

Basic text and structure are preserved, but complex formatting may lose accessibility features. For official publications, perform additional accessibility testing and remediation.

How do I fix broken hyphenation in the converted EPUB?

Edit the text to remove inappropriate hyphens, or adjust conversion settings to control hyphenation behavior. Some readers allow users to disable hyphenation if it causes problems.

What metadata should I include in my EPUB?

At minimum: title, author, and language code. For better results: publisher, publication date, rights statement, and subject tags. Proper metadata ensures correct hyphenation and improves discoverability.

How do I test if my PDF has a usable text layer?

Try selecting text and searching for phrases. If both work, the text layer is likely intact. If not, the PDF may be a scan or have corrupted text.

References

Put the method to work

Use the private browser tools