I am looking for a good open source tool to create EPUB files from ODT or PDF files.
It needs to run on Windows and Linux as well as be open source.
LibreOffice 6 can natively convert .odt and .pdf files to .epub format without needing to install any plugins in LibreOffice Writer. LibreOffice is open source and cross platform (Windows/Mac/Linux).
If you want more granular control over the formatting of the .epub document:
Convert the original document to .rtf format and save it as a new document.
Edit the .rtf document in LibreOffice Writer to make it ".epub friendly".
BLANK_PARAGRAPH and then with Alternative Search and Replace for Writer extension replace all instances of
Convert it to .epub from the command line with the Calibre application's
ebook-convert input_file.rtf output_file.epub --cover COVER-FILE-LOCATION --remove-paragraph-spacing --chapter-mark none --flow-size 100
This command gives very nice results, but I think most people will be happier if they use LibreOffice Writer to do the document conversion instead of doing it the hard way with Calibre's command line tool.