epub2pdf v0.5 - 15 May 2010 - Copyright 2010 Brendan C. LeFebvre. See LICENSE DETAILS below for full license and warranty information. OVERVIEW epub2pdf is a command-line tool that quickly generates PDF files from EPUB ebooks. It allows the user to specify page size, fonts, margins, and default paragraph alignment. The motivation for this program was my purchase of the Foxit eSlick e-reader device. For the first year or so of its existence on the market, it only supported PDF and plain-text files. I began writing this software so I could comfortably read more of my ebook collection on the device. As a courtesy to fellow eSlick users, the margin and page-size defaults are optimized for that device. SYSTEM REQUIREMENTS Tested on Windows Vista and Fedora Linux. Will theoretically work on any platform for which Java 6 is available. The Java Runtime Environment, version 6 or later, must be installed. Retrieve it at (http://www.java.com/). The "java" or "java.exe" binary must be in your path, which is usually done for you with JRE installation. QUICK START Unzip the epub2pdf zipfile in a location of your choice. It will create a directory called "epub2pdf". Open a command prompt, change to the new "epub2pdf" directory, and invoke the program like so: (Windows) epub2pdf.bat (Linux / OSX / etc.) chmod +x ./epub2pdf.sh ./epub2pdf.sh By default, the PDF is formatted for the Foxit eSlick Reader and is placed in your home directory. CONFIGURATION Output behavior is controlled by the simple properties file "epub2pdf.properties" in the main "epub2pdf" directory. You can control margins, page size, default fonts, and output directory. Comments in the file explain the syntax. Windows users: use FORWARD SLASHES (/) when specifying the output directory, or Java will choke. CHANGES Since v0.4: - Fixed incorrect cancellation of bold/italic modes in some cases. - Fixed failure to handle trailing spaces in epub2pdf.properties. - Console output is now prettier and more compact. - Improved alignment of full-page images. - Batch processing now continues after a failure. - Fixed a crash that occurred when converting some older EPUBs. Since v0.3: - PDF bookmark list now replicates any nesting in the EPUB's NCX table of contents. Since v0.2: - Fixed an issue with "sticky formatting", where bold or italic text specified by an inline tag would persist for the remainder of the enclosing block element. - Fixed an issue that triggered extra paragraph breaks at some inline tags. - Images now appear at the exact place they are declared, rather than being postponed when they do not fit on the page. (If the image is too large to fit on the remainder of the page, a new page is created first.) - A new page is created in the PDF when the parser encounters a file or element specified in the NCX. - CSS parser can now handle numeric specification of font-weight (>=700 bold, else normal). - Correct version number now appears in console at program start. - Various minor improvements to source code organization and cosmetics. Since v0.1: - ePub table of contents now appears as a bookmark list in the finished PDF. There is no nesting (yet) but all TOC elements should appear. - International characters now render correctly *as long as* you are using a TrueType font with the necessary glyphs. The default Adobe fonts that ship with the iText library will not work. Copy the .TTF/.TTC file(s) for your desired fonts into epub2pdf/lib/fonts, then update the default.font property in epub2pdf.properties with the human-readable name of your font (e.g. "calibri", "garamond", etc.) - Numerous minor bugfixes. KNOWN ISSUES / LIMITATIONS All of the following issues are slated for resolution in future releases. - CSS support is limited to detecting bold and italic modes. On the other hand, even this meagre capability is more CSS than Foxit's EPUB renderer can handle, so it is hard for me to be too ashamed of this one. - Having said that... bold/italic text sometimes has an extra space at either end. CONTACT General inquiries / suggestions: Report problems to . If possible and relevant, attach the epub and pdf in question, and the full text of any error messages. At this early stage I am particularly keen to stamp out any remaining "showstopper" bugs that cause the PDF creation process to fail entirely. If you find this software useful, please consider a modest donation via PayPal to . LICENSE DETAILS epub2pdf is released under the GNU General Public License, version 3 or later. See file "COPYING" for full license text. In compliance with the terms of the GPL, a full source distribution (epub2pdf and all included libraries) is available at . This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .