Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-31-2025, 01:27 AM   #1
axu2
Groupie
axu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfolded
 
Posts: 166
Karma: 52202
Join Date: Jun 2023
Device: Kindle Scribe
[Guide] Fixing Google Docs EPUBs

Google Docs provides an EPUB download option. But it has tons of problems when used on various readers like Apple Books or Kindle.

Specifically:
1) extremely weird image formatting/squishing (presumably due to Google Docs being fixed layout.)
2) the colors looking terrible on eink, especially if the google doc has a background color
3) and more...

The other download options like docx, MD, have even more problems.

So here's how to fix the Google Docs EPUB output so it works well in many readers like Kindle, iBooks, etc. You can set these settings as Calibre default if you want. If you have feedback please share!

* Download EPUB from Google Docs
* Import into Calibre
* Update Title and Author metadata.
* Convert books (in bulk if doing many books)
* Set Output format to EPUB.
* Change these Conversion settings:
** Look and Feel
*** Styling
**** Extra CSS
Code:
img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  display: block;
}
This makes all images responsive instead of fixed size like in a Google Doc. display: block adds a line break after images.
*** Filter Style Information
**** Check Colors and font and padding (this removes Google Docs background color/custom fonts)
*** Transform HTML
**** if tag is span remove attribute style
**Page Setup
*** Select tablet output profile at bottom so images aren't reprocessed
** EPUB output
*** Select EPUB 3, default is EPUB 2, so formatting isn't lost.

and finally add your covers. To get calibre to show in library, bulk edit metadata, update cover from e-book file.

Now you have a perfectly formatted epub that looks great in iBooks or Send to Kindle.

Video version (slightly outdated): https://www.youtube.com/watch?v=jWNql6iJbiA

Changelog since video:

1) added remove fonts checkbox to fix changing fonts.
2) don't remove spans entirely, only the inline style. Was accidentally removing bold/underline/italics previously.
3) added remove padding checkbox to fix chapter heading spacing.

Last edited by axu2; 03-31-2025 at 01:29 AM.
axu2 is offline   Reply With Quote
Old 03-31-2025, 05:43 AM   #2
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,952
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Export the Google Docs as a docx. Fix the styles, links, chapters/headings, footnotes etc in LO Writer (or a local MS-Word if you must), because Styling in Google Docs is "broken". Only edit as odt. Have the Navigation/outline windows and and Style browser windows open in either.
A final extra Save As in docx as well as odt and convert using Calibre. Never re-edit the docx, but the odt.


A total waste of time to do anything else. Also you know Google "steals" it for their AI? Google Docs should only be used for real time collaboration, though there are now other options.


So no-one should use that guide.
Quoth is offline   Reply With Quote
Advert
Old 03-31-2025, 11:40 AM   #3
axu2
Groupie
axu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfoldedaxu2 reads XML... blindfolded
 
Posts: 166
Karma: 52202
Join Date: Jun 2023
Device: Kindle Scribe
Thank you for your feedback. Looks like I was missing some context in my guide.

I wanted to read about thirty 200-page novels in Google Docs written by various fan-translators. I don't have any control over the source format.

Quote:
Fix the styles, links, chapters/headings, footnotes etc in LO Writer (or a local MS-Word if you must), because Styling in Google Docs is "broken". Only edit as odt. Have the Navigation/outline windows and and Style browser windows open in either.
Thanks for telling me about LO Writer, I'll look into it. But it looks like just the LibreOffice version of Word. It sounds more manual and tedious than loading up Calibre, importing 30 epubs, and running a bulk convert that essentially removes the broken styling.

Last edited by axu2; 03-31-2025 at 12:34 PM.
axu2 is offline   Reply With Quote
Old 04-01-2025, 06:56 AM   #4
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,952
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
If you want decently formatted ebooks there is no alternative to fixing styling. Calibre can't really fix styles, (formatting), only remove. I do remove "line-height" and "white-space" automatically on every ebook from every source as those CSS are inappropriate for any reflowable ebook.

LO Writer is now better than Word 2007 for most things.

I also have had to use documents from Google Docs in the past. Fortunately I can now avoid it.
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Docs birdheh enTourage eDGe 5 02-05-2012 08:28 AM
How to Get Google Docs on Pocket Edge/Docs to Go SherriK enTourage eDGe 4 10-07-2011 02:26 PM
Fixing the New Google Market taosaur Nook Developer's Corner 17 08-29-2011 01:01 AM
Google Docs and PE ftrooper93 enTourage Archive 7 05-24-2011 02:44 PM
fixing broken button (guide) ashadocat Sony Reader Dev Corner 0 10-01-2009 01:52 AM


All times are GMT -4. The time now is 09:22 AM.


MobileRead.com is a privately owned, operated and funded community.