AI-assisted formatting saves time, but it can introduce subtle errors that break your e-book. This guide covers the most frequent glitches and how to fix them quickly.
1. Clean Up Rogue CSS
AI tools sometimes add experimental prefixes like -webkit- or -moz-. Amazon’s Kindle engine doesn’t need them and they can cause validation failures. Remove all these prefixes from your stylesheet.
Symptom: KDP upload fails with a “fixed-layout content in a reflowable file” message. Cause: The AI added position:absolute or float to an image. Fix: Replace with display:block; margin:0 auto; and remove any pixel heights on containers.
For stubborn CSS bugs, use the binary method: (1) In your stylesheet, comment out the suspect class (e.g., .chapter-intro). (2) Re-convert the e-book. (3) If the problem disappears, that rule is the culprit. Rewrite it without inline positioning or pixel widths (except for images).
2. Image Glitches: Size, Alignment, and Missing Files
Huge images: AI often embeds a 5‑MB camera photo without resizing. Resize all images to 800–1200 pixels on the longest side and compress to under 100 KB. Use Kindle Previewer’s Validate button after uploading—it checks image dimensions.
Misaligned: An AI may use float or absolute positioning based on the source layout. In reflowable e-books these break. Instead, keep images inline with max-width:100%; height:auto; and center with text-align:center on the parent.
Missing images: AI tools can fail to embed the image file in the ePub package or use an incorrect file path. Check the manifest (opf file) or use epubcheck (command line) to detect missing references. In Adobe Acrobat Pro, run Preflight under Print Production to verify PDF-based images.
3. Validation & Structure Errors
Symptom: Unexplained line breaks, odd spacing, or text that won’t align. Run epubcheck or use an online validator. Common causes:
- Pixel-based
widthorheighton non-image elements (e.g., divs, tables). Replace with percentages orauto. - CSS classes that don’t match your stylesheet—AI sometimes generates random class names. Strip all unused classes.
- For multi-column text: avoid CSS columns. Let the reader’s device control column count. Use clear paragraph breaks instead.
Consistency check: Are all blockquotes using the same style? Are all chapter titles using the exact same paragraph style (e.g., “Heading 1”)? Are section breaks represented by a unique, consistent paragraph style (“SceneBreak”)? Inconsistent styles cause reflow nightmares. Use your editor’s Find & Replace to enforce uniformity.
4. Final Sanity Check
Before uploading to KDP, always validate with Kindle Previewer. Then run Preflight in Adobe Acrobat Pro (if using PDF input) and epubcheck for ePub. A few minutes of troubleshooting prevents rejected uploads and poor reader experiences.
For a comprehensive guide with detailed workflows, templates, and additional strategies, see my e-book: AI-Assisted E-book Formatting for Self-Publishers.