Convert EPUB to PDF with original (print) formatting?

38,317

Solution 1

I have now experimented with numerous, numerous tools to convert epub to pdf, but none do what I was hoping to accomplish. I have also experimented with numerous e-readers in general, hoping to display my files as I wanted them and then "print" them directly to a software pdf printer. The newest version of calibre's e-book reader allows printing directly to PDF. Unfortunately, those pdfs do not resemble the text as you are viewing it in the e-reader window. Regardless of the font size of the e-reader text, the pdf is built using font sizes specified elsewhere. This would be a suggestion for future releases of calibre to implement: print as-you-see-it from the e-reader window.

Of the various e-readers I used, epubreader extension for firefox is by far the best and most stable (calibre used up all 2GB of my ram before hanging and crashing multiple times). The display settings of epubreader allow great flexibility for displaying the text "as defined by the book settings," although the e-book settings do not always perfectly preserve the exact appearance of the print book. For all of its strengths, however, epubreader does not seem able to print to a pdf or to print from firefox at all. When I contacted support, I was referred to calibre.

As it stands, calibre is still the tool that comes closest to accomplishing my original goals. Hopefully future releases of calibre or epubreader will implement a print-as-you-see it option, allowing their ebook readers to double up as a live "print preview." Until then, I will have to make do with editing the epub raw data with calibre epub editor, and/ or building dozens of pdf books before I find the most acceptable settings for producing a suitable pdf.

Solution 2

Maybe it's too late, but if anyone would be interested in future.

The best way I've so far found is add epub book to Calibre , then open up the book and print to pdf (bottom left button).

That way, I've achieved the best results with text-only book (dunno how pictures) compare to "convert option".

Share:
38,317

Related videos on Youtube

Nathanael
Author by

Nathanael

Updated on September 18, 2022

Comments

  • Nathanael
    Nathanael almost 2 years

    I really hate .epub format. I have tried several online and downloaded tools to convert some .epub books I have to PDF, but it still is unsatisfactory as the original page breaks are not preserved and the formatting always messes up, text is too big, fonts are lost, colors missing, graphics poorly preserve and sometimes fall on a page break, special symbols and non-English alphabets look like a botched OCR job, random chunks of text are inserted, etc. I have tried Calibre, Epubor, Zanzar, etc. The output always seems unusable.

    My question: .epub files preserve the original page break locations, if I am not mistaken. Is there any .epub to .pdf converter that can simply break the PDF pages where the original print book broke the pages, and resize the text and graphics to fit (I am assuming .epub does NOT preserve the original text size data?). I want a PDF which looks as close to the original print book as possible, pulling upon any data which a .epub file might store about the original print book. I already have a .epub file, so I would rather not manually scan the entire book and compile to a PDF, if at all possible.

    Calibre seems the most flexible of the various .epub to .pdf converters I have tried. If it is possible to do this by setting certain configuration settings with Calibre (or any other software).

    EDIT: I have tried numerous .epub readers and Adobe Digital Editions, Sumatra PDF, and Calibre are the best I have tried by a longshot. However, only Calibre seems able to print those .epubs to a .pdf, or print .epubs at all! One big problem I have is that large images that take a whole page in the print book are broken down into chunks in the eBook, regardless of the font and margin size, even when the larger image would fit on screen! one! two! Same deal across e-readers.

    • Karan
      Karan about 9 years
      EPUBs are basically just zipped up HTMLs. What's there to hate them so much anyway?
    • Nathanael
      Nathanael about 9 years
      I do not like that all formatting is lost, that original page breaks are not preserved, and many other formatting issues as I mentioned above are also often present in the .epub format which are handled much better by .pdf
    • Karan
      Karan about 9 years
      That only tells me it's a badly produced EPUB. I have lots that look just fine formatting-wise.
    • baochan
      baochan about 9 years
      epub files generally only contain page breaks at the end of chapters - the whole point is you can resize the font to fit any screen and it will fill every page top to bottom. Adjusting the font size in the converted PDF with Calibre should get decent results but it will never have breaks in the exact place as a printed book.
    • Nathanael
      Nathanael about 9 years
      I have tried several readers which are able to display "page break" data in the margins of my ebooks, but I have found out that these page breaks do not always correspond exactly to the print "page breaks." For example, text originally printed with multiple columns on one page are interpreted as separate pages per column. In that case, I don't suspect their is anyway to construct the original look without editing every page manually with calibri editor :P But not all books are formatted in columned text, so the page breaks should mostly be preserved, I would think.
    • Nathanael
      Nathanael about 9 years
      @Karan perhaps the biggest issues I am still having are 1) large images are chopped up into chunks, as the examples I have provided in my edited post above, and 2) non-English symbols are preserved as horribly-low-quality images which do not scale with the text, and are highly pixelated. I am talking about probably 7-10 different .epubs produced from different sources, and read in various readers including Adobe Digital Editions, Bluefire, Calibre, Sumatra pdf, Cool Reader, etc. Unless it is a novel preserving just text with minimal formatting, most textbooks and manuals are unusable in .epub
    • Karan
      Karan about 9 years
      Again, those examples you've shown of images being chopped up are clearly badly produced EPUBs. If the image was a single one in the file then any good EPUB reader would display it as-is, with scrollbars if required. Regarding Non-English symbols, again you're clearly using EPUBs made by incompetent people (or perhaps pirates?) Just as fonts can be embedded in PDFs to add support for various non-English Unicode characters, OTF fonts can also be added to the OPS folder and the OPF file inside an EPUB and referenced via CSS @font-face rules.
    • Nathanael
      Nathanael about 9 years
      @Karan interesting. Nope, no pirated .epubs. All of the ones I am working with were accessed directly from the publisher of the print books, legally. But I can believe they were compiled less-than satisfactorily, or through some automated process without checking the results. Unfortunately this has seemed to be the norm too often in my opinion, which I suppose is why I am partial to pdfs. For now, I guess I am stuck with what I have. I have found that epubreader for Firefox does a better job of displaying .epubs than even Adobe, in my experience.
    • didest
      didest over 8 years
      The really best results I got were using the "pandoc" software (softwarerecs.stackexchange.com/a/23068/18566)
    • Zhang
      Zhang over 4 years
      @Karan, When I copy multi-lines from epub to text, it always loses the line breakers.
  • Nathanael
    Nathanael about 9 years
    Checked out XCHM, but not sure how it solves my problem. Is it even able to read .epub format? It is essentially just a reader for .chm help files? Is it able to display my .epub files breaking the pages at the original page breaks so I can at least print the .epub to a .pdf file?
  • linuxdev2013
    linuxdev2013 about 9 years
    Yes it can. While not planning to be a learn eformats 101 post, maybe reading the docs it comes with would help (not everything is one stop shop OR OOTB ready for all). Its what I and my clients use for reading epub/pdf/chm files for ALL sorts of subject material.. ----maybe you could give a screenshot of this malformatting so one of us could possible decipher if its the program or user-defined settings causing it.
  • Nathanael
    Nathanael about 9 years
    I spent an afternoon experimenting with XCHM and reading the manual, and it does not appear to load .epub format at all, let alone allow me the flexibility to display the pages as mentioned. What CHM editor in particular do you and your clients use? I have tried several from this list with no success in loading .epub format or having flexibility to display the pages like this. I have also tried most of the e-readers from here
  • user5504603
    user5504603 about 7 years
    For what it's worth, Calibre 2.82 on OS X produces (with all default settings) a fair representation of an epub as PDF, using the reader and print to PDF.
  • bgoodr
    bgoodr over 4 years
    That is suboptimal solution. I believe they want something that will work without manual labor.