You have a manuscript in PDF or DOCX. You want an EPUB that opens cleanly on every major e-reader, passes retailer checks, and doesn't embarrass you in front of readers. The gap between "it looks fine on my screen" and "it validates and renders correctly everywhere" is where most indie conversions fail. This guide gives you a technical preflight workflow: a repeatable set of checks you run before conversion, then again after, so you catch structural, stylistic, and metadata problems while they are still cheap to fix.
Why preflight matters more than the conversion tool
Conversion software is not magic. It reads the structure you give it and maps that structure to EPUB's XHTML and CSS. If your DOCX uses manual line breaks instead of paragraphs, or your PDF has no semantic tags, the converter has to guess. Guessing produces merged paragraphs, broken headings, and inaccessible reading order.
Preflight is the discipline of making your source unambiguous. A clean source converts predictably. A messy source converts unpredictably, and you end up fixing the EPUB instead of the manuscript. The workflow below fixes the source first, then validates the output.
Step 1: Choose the right source format
DOCX is almost always the better starting point. It preserves paragraph styles, heading levels, and inline emphasis as structured data. PDF, by contrast, is a page-description format: it stores text positioned on a canvas, not paragraphs in a hierarchy. Converting PDF to EPUB means reconstructing structure from geometry, which is error-prone.
If you only have a PDF, your first job is to recover the manuscript. Options, in order of preference:
- Ask the author or publisher for the original DOCX or Markdown.
- Use OCR or PDF text extraction, then clean the result in a word processor.
- If the PDF is a print-ready export of a DOCX, reverse-engineer it only as a last resort.
Worked example: a 300-page PDF converted directly might yield 2,400 "paragraphs," many of which are single lines from the same paragraph. After extraction and reflow, that same book should have roughly 900 to 1,200 real paragraphs. If your paragraph count is more than double your expected count, your source is still fragmented.
Step 2: Normalize the DOCX before you touch a converter
Open the DOCX and run these checks in order. Each one removes a class of conversion bug.
Paragraph and line-break hygiene
- Turn on formatting marks. Every paragraph should end with a paragraph mark, not a manual line break (Shift+Enter).
- Search for double spaces and replace with single spaces. Search for space-before-paragraph and remove it.
- Remove tabs used for indentation. Use paragraph style indentation instead.
- Remove empty paragraphs used as spacers. Use space-before or space-after in the style.
Heading structure
- Apply Heading 1 for chapter titles, Heading 2 for sections, Heading 3 for subsections. Do not fake headings with bold, larger text.
- Check that heading levels do not skip. A Heading 1 should not be followed directly by Heading 3.
- Remove headings from front matter that should be plain text, such as a dedication or copyright page.
Emphasis and special characters
- Use italics and bold character styles, not manual font changes.
- Replace straight quotes with curly quotes if your house style requires them, but do it consistently.
- Check for smart quotes that break code samples. If your book contains code, use a monospace character style and straight quotes inside it.
Lists, tables, and images
- Convert manual bullet characters into real list styles.
- Simplify complex tables. EPUB readers handle simple tables poorly enough; nested tables are worse. If a table has more than four columns, consider converting it to a list or a figure.
- Anchor images to paragraphs, not to page positions. Give every image alt text.
At this stage, EpubBit can help by letting you inspect the normalized document structure and flag style inconsistencies before conversion. It is not a replacement for fixing the DOCX, but it gives you a second pair of eyes on the structure you are about to commit to.
Step 3: Map styles to a minimal CSS contract
EPUB is HTML plus CSS. Your converter will generate CSS from your DOCX styles, but the result is often bloated. Define a small style contract and map your DOCX styles to it.
A practical minimal set:
bodyfor base text: font-family serif, line-height 1.5, margin 0, text-align left.h1for chapter titles: font-size 1.6em, margin-top 0, page-break-before always.h2for sections: font-size 1.3em, margin-top 1.2em.pfor paragraphs: text-indent 1.2em, margin 0.p.firstfor the first paragraph after a heading: text-indent 0.blockquotefor quotations: margin-left 2em, font-style italic.codefor inline code: font-family monospace, font-size 0.9em.
Do not set absolute font sizes in pixels. Use relative units (em, rem) so readers can adjust text size. Do not set page margins in the CSS; let the reading system handle margins. Avoid fixed widths on images; use max-width: 100% and height: auto.
Worked example: if your body text is 11pt in the DOCX and your chapter title is 18pt, the ratio is about 1.64. Set h1 to 1.6em rather than 18pt. This preserves the visual hierarchy while respecting user settings.
Step 4: Prepare metadata and identifiers before conversion
Metadata is not an afterthought. Retailers and library systems use it to match your book to its listing. Missing or inconsistent metadata causes failed ingests and duplicate listings.
Collect these fields in a plain text file before you convert:
- Title and subtitle, exactly as they appear on the cover.
- Author name in the form you want readers to see, plus a sort name (Last, First).
- Language as a BCP 47 tag, such as
enoren-US. - Publisher and publication date in ISO 8601 format, such as
2025-03-14. - ISBN if you have one. Use the 13-digit form without hyphens in the EPUB metadata.
- Series name and series number if applicable.
- Description or blurb, ideally under 4,000 characters.
- Rights statement, such as "Copyright 2025 by Your Name. All rights reserved."
Also decide on a unique identifier. If you have an ISBN, use it. If not, use a UUID. Most conversion tools can generate a UUID automatically. Do not reuse the same UUID across different books.
Check the current official documentation from your target retailers for their exact metadata requirements, because fields and limits change. Do not assume a field is required or optional based on an old blog post.
Step 5: Run the conversion and inspect the output structure
Convert to EPUB 3 unless you have a specific reason to target EPUB 2. EPUB 3 supports accessibility features and modern CSS. After conversion, unzip the EPUB and inspect the file tree. An EPUB is a ZIP archive with a specific structure.
You should see:
mimetypeas the first file, uncompressed, containing exactlyapplication/epub+zip.META-INF/container.xmlpointing to the package document.- A package document, usually
OEBPS/content.opfor similar, containing metadata, manifest, and spine. - One XHTML file per chapter or section, plus a navigation document.
- A CSS file or files.
Open the package document in a text editor. Check that the spine order matches your reading order. Check that every item in the manifest has a unique ID and a correct media type. Check that the navigation document lists all major sections.
If your converter produced one giant XHTML file for the whole book, consider splitting it. Many reading systems handle large files poorly, and splitting improves navigation and accessibility.
Step 6: Validate with epubcheck and fix errors by category
Run epubcheck, the reference validator for EPUB. It reports errors, warnings, and usage messages. Treat errors as blockers. Treat warnings as items to review.
Common error categories and fixes:
- OPF errors: missing required metadata, duplicate IDs, incorrect media types. Fix by editing the package document directly or re-exporting with corrected metadata.
- XHTML errors: unclosed tags, invalid nesting, missing alt attributes. Fix in the XHTML source or, better, fix the DOCX and reconvert.
- CSS errors: unknown properties, invalid values. Remove or correct them.
- Navigation errors: missing nav document, broken internal links. Rebuild the table of contents.
Worked example: if epubcheck reports 47 errors and 120 warnings, do not fix them one by one in the EPUB. Group them by category. If 40 of the 47 errors are missing alt attributes, fix the image alt text in the DOCX and reconvert. That single fix may clear most of the list.
EpubBit can fit here as a preflight and postflight companion: use it to inspect the converted EPUB, review metadata, and catch structural issues before you run epubcheck, so the validator output is shorter and more actionable.
Step 7: Test rendering on real reading systems
Validation is necessary but not sufficient. A valid EPUB can still render badly. Test on at least three environments:
- A desktop reader such as Calibre's viewer or Adobe Digital Editions.
- A mobile reader on iOS or Android, such as Apple Books or Google Play Books.
- A dedicated e-ink device if you have access to one, such as a Kindle or Kobo. For Kindle, test the EPUB through Amazon's current conversion path, and verify the current official documentation for supported formats.
Check these specific things:
- Chapter starts on a new page where intended.
- No text is cut off at the right edge or hidden behind fixed elements.
- Images scale correctly and are not pixelated.
- Links in the table of contents jump to the correct locations.
- Footnotes and endnotes work as links or pop-ups, depending on the reading system.
- Font size changes do not break the layout.
- Dark mode or night mode does not make text unreadable.
If a problem appears only on one device, note the device and reading system version. Reproduce it in a second environment before changing the EPUB. Some rendering quirks are device-specific and not worth breaking other readers to fix.
Step 8: Accessibility and quality checks
Accessibility is part of quality, not a separate project. Run these checks before you publish:
- Every image has meaningful alt text. Decorative images have empty alt text.
- Heading levels are sequential and describe the content.
- Language is declared in the package document and on any foreign-language passages.
- Page numbers from the print edition are not the only navigation method. Use chapters and sections.
- Color is not the only way to convey meaning.
- Text can be resized to 200% without loss of content or function.
Worked example: a 60,000-word novel with 12 chapters and no images should have at least 12 navigation entries, one per chapter, plus front matter and back matter. If your navigation document has only one entry, the table of contents did not convert correctly.
Step 9: Final preflight checklist before upload
Run this checklist every time, even for a short book. It takes ten minutes and prevents most support emails.
- Source DOCX is normalized: no manual line breaks, no fake headings, no empty spacer paragraphs.
- Metadata file is complete: title, author, language, identifier, publisher, date, rights.
- Cover image is included and referenced in the package document with the correct properties.
- EPUB opens in at least two reading systems without errors.
- epubcheck reports zero errors.
- Navigation document lists all major sections in order.
- All images have alt text.
- No broken internal links.
- File name is clean: no spaces, no special characters, no version numbers that will confuse you later.
- You have verified current retailer requirements in their official documentation.
Conclusion
Converting a PDF or DOCX to EPUB is not a single button press. It is a pipeline: normalize the source, define a small style contract, prepare metadata, convert, validate, test, and check accessibility. The preflight steps are where the real work happens. Do them once, and your EPUB will behave predictably across readers. Do them every time, and you build a repeatable production process that scales from one book to a catalog.
Keep your source files clean, keep your metadata in one place, and treat validation as a gate rather than a suggestion. The result is an EPUB that readers can actually read, on whatever device they choose.