How to Export LibreOffice Documents to EPUB
Converting LibreOffice Writer documents to the EPUB format allows authors and publishers to create standardized e-books readable on smartphones, tablets, and dedicated e-readers. LibreOffice provides a built-in native export filter, supports dedicated extensions for enhanced customization, and integrates seamlessly with third-party command-line converters. This guide outlines the primary export filters and methods available for converting your documents to EPUB format.
1. The Native LibreOffice EPUB Export Filter
Starting with LibreOffice version 6.0, a native EPUB export filter is
integrated directly into the software, powered by the open-source
libepubgen library. This filter is the standard,
out-of-the-box solution for generating e-books.
To access the native filter: 1. Open your document in LibreOffice Writer. 2. Navigate to File > Export As > Export as EPUB… (or choose File > Export… and select EPUB Document (.epub) from the format dropdown). 3. Configure the export dialog options to suit your reading device requirements.
Key parameters in the native export dialog include: * EPUB Version: Choose between EPUB 3.0 (recommended for modern formatting, accessibility, and media support) and EPUB 2.0 (for compatibility with older e-reader devices). * Split Method: Automatically split your e-book into distinct chapters based on document structure, such as Heading styles or Page breaks. * Layout Method: Select Reflowable (standard text that adjusts to screen size) or Fixed layout (best for illustrated books or complex designs). * Metadata: Embed the e-book’s title, author, language, and unique identifier (ISBN/UUID) directly from document properties.
2. Writer2xhtml and Writer2EPUB Extensions
For users needing more control over CSS generation, typography, and advanced code cleaning, third-party LibreOffice extensions offer alternative export filters.
- Writer2xhtml / Writer2LaTeX: This extension family provides a dedicated XHTML/EPUB export engine that gives precise control over how LibreOffice styles are mapped to CSS rules. It is particularly useful for documents containing complex scientific notation, tables, or specialized font requirements.
- Writer2EPUB: A community-developed extension specifically tailored for indie publishers. It provides a visual interface for adjusting font embedding, generating customized tables of contents, and stripping unwanted formatting artifacts prior to final output.
3. External Filter Engines (Pandoc and Calibre)
When automated publishing pipelines or advanced file normalization is
required, external document conversion engines act as external export
filters for LibreOffice OpenDocument Text (.odt) files:
- Pandoc: A universal document converter that
natively reads
.odtfiles and converts them to EPUB 2 or EPUB 3 with syntax highlighting, custom EPUB stylesheets, and metadata templates. - Calibre (
ebook-convert): The Calibre e-book management suite contains a dedicated conversion engine capable of importing.odtdocuments directly, providing deep control over font subsetting, cover generation, and structural heuristics.
Best Practices for Clean EPUB Export
Regardless of the export filter chosen, ensuring clean e-book output requires proper document formatting inside LibreOffice: * Use predefined Heading 1, Heading 2, and Heading 3 styles rather than manual font scaling to ensure the table of contents and chapter splits generate correctly. * Avoid using repeated empty paragraph returns to create vertical spacing; use paragraph style margins instead. * Insert images with standard inline or paragraph anchoring to prevent overlapping or missing graphics in reflowable layouts.