From LibreOffice to ePub

Off the Beat: Bruce Byfield's Blog
As someone contemplating ebook publishing, I found the LibreOffice / OpenOffice.org extension Writer2ePub worth investigating. After all, while GNU/Linux has a couple of apps that can read the popular ePub format -- Calibre and Lucidor -- about the only way to actually produce ePub content is to export from DocBook. However, I'll have to wait a version or two before relying on Writer2ePub.
Writer2ePub is available from the OpenOffice.org extensions site, where it is currently the highest rated extension -- which makes me wonder how carefully people have examined it before rating it. You can download it in seconds, then use Tools -> Extension Manager to install it. As with most extensions, you need to restart so that Writer2ePub is loaded.
The extension creates a toolbar of three buttons in the upper left corner of the editing window -- one for exporting to ePub format, one for editing meta-data, and the third for preferences.
However, before you use Writer2ePub, you need to save your document. As you write, you will want to use at least the Heading1 style, because that is the easiest way to divide your output into the chapters. If you want smaller divisions, you can use Heading2 and Heading3 as well. Probably, though, you'll want to use character, paragraph, and page styles throughout the document, because if you need to make any adjustments -- and, very likely, you will -- changing a style is much quicker than making corrections line by line.
Setting Preferences
When you are ready to export to ePub format, click Writer2ePub's Preferences button. There, you can decide how to create chapters -- either by specifying which Heading style marks the start of each chapter, or else by kilobytes (an option I don't recommend, because it is a less reliable indicator of where to divide chapters than using a style as marker.
The Preference window also gives you the option of selecting the font height and font. In most cases, you'll probably only need to make sure that the font is the same for both the source and output files, but the option to make adjustments is there if you need it.
Other preferences include the meta-data you want to include in the file, and operational options: you can keep the working file after you export to ePub, hide any messages Writer2ePub gives during export, and automatically close the source file after you finish exporting. It's also a good idea to choose to show the meta-data window before exporting, so you can have one final check before you create the export file.
Exporting to ePub format
Before you export, you are required to give at least a title as meta-data for the output. Note that the title is not the file name.
You also have the option of adding an ISBN, publisher, publishing date, tags, a cover, and comments. The cover, though, should be the same dimensions as the rest of the pages, or else it won't show up.
So far, so trouble-free. But when you click the OK button and export, you'll quickly find that Writer2ePub output is usually adequate, but far from perfect if you are exporting anything except a basic text-heavy document.
Even if you are careful to use the same font in the source and output, spacing such as line indentation or spaces between paragraphs may change. Bullets and numbers in lists simply disappear. Pictures are forced into left alignment. Tables are reduced to a single row of cells.
Once you know these limitations, you can work around many of them. You can, for example, create graphics with white space on each side to center-align a graphic, or create a table as a graphic.
However, these makeshifts are going to look clumsy unless you labor over them, and the real question is why you should have to. Writer2ePub is supposed to be a simple desktop solution, so users have a right to complain if it falls short of its goal. In layout, kludges and almost are rarely good enough, especially if you need professional-looking output.
Writer2ePub has the basics down, so its developers can now concentrate on improving its conversion. However, until improvements come, giving it a five start rating is an exaggeration that will only mislead others -- to say nothing of a disappointment to those of us who want a tool we don't have to think much about.
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

News
-
openSUSE Tumbleweed Ditches AppArmor for SELinux
If you're an openSUSE Tumbleweed user, you can expect a major change to the distribution.
-
Plasma 6.3 Now Available
Plasma desktop v6.3 has a couple of pretty nifty tricks up its sleeve.
-
LibreOffice 25.2 Has Arrived
If you've been hoping for a release that offers more UI customizations, you're in for a treat.
-
TuxCare Has a Big AlmaLinux 9 Announcement in Store
TuxCare announced it has successfully completed a Security Technical Implementation Guide for AlmaLinux OS 9.
-
First Release Candidate for Linux Kernel 6.14 Now Available
Linus Torvalds has officially released the first release candidate for kernel 6.14 and it includes over 500,000 lines of modified code, making for a small release.
-
System76 Refreshes Meerkat Mini PC
If you're looking for a small form factor PC powered by Linux, System76 has exactly what you need in the Meerkat mini PC.
-
Gnome 48 Alpha Ready for Testing
The latest Gnome desktop alpha is now available with plenty of new features and improvements.
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
ODFToEPub
Werner Donné
Pincette bvba
Writer2ePub