Mobileread
Trimming .epub and .mobi files for size?
#1  hap124 01-20-2018, 12:27 PM
I have noticed some files in both formats are much larger than other books of similar length and image content. My library is mostly fiction and the smallest are in the 200-300kb range and many are 2mb or more with no real difference in image content etc. From looking around at my larger files I see fonts take up the majority of the space (80% of file size in one instance). Can I just delete all but one font from the "font" folder in both formats without any other adverse effects? I could reduce my library size by a huge amount if this is workable. If it is doable is there a way to automatically remove all these superfluous fonts or is picking them out manually the only way?
Reply 

#2  slowfax 02-25-2018, 11:27 AM
Generally you can completely remove all fonts without any problems.
Exception:
If there is a special character in an ebook (e.g. from a foreign language or a mathematical formula sign: ý, ƾ, ؾؾ, ∑ or similar), you can at least reduce the size of the fonts by using a (built in) Calibre plugin. I don't know the english name of the plugin. In German language it is called "Bücher perfektionieren", translated anything like "make your book perfect". This plugin deletes all unused letters of the font and it additionally reduces the size of the images.
Reply 

#3  JSWolf 02-25-2018, 11:38 AM
Some eBooks such as those from Penguin Random House have useless fonts embedded. They have one XHTLM file that uses those fonts and that file can be deleted as well as the associated fonts. Also, I reduce the size of the cover and titlepage graphics down to 1600 lines. And in most cases, I'll losslessly compress at 80% as most of the graphics used it won't be an issue. I'll also remove any extra bits like a review page, any advertising and any associated graphics. Also, any previews go along with the graphics (if any). Also gone is about the publisher and books by the author. I'll also remove unused CSS as that can make the book perform better without the sum times hundreds of unused CSS. Also, if there are embedded fonts that I'm not deleting, I'll subset them. After all of this, I can significantly reduce the some of some ePub. I'm using the Calibre editor for these things.

As for Mobi, you cannot edit them, so don't start with Mobi. Saying that, you can do these sorts of edit on KF8 (AZW3). If ePub is your source and a Kindle supports KF8 or KFX , convert to KF8 or KFX (if it works using the KFX conversion plugin and your device supports KFX) and forget Mobi exists.
Reply 

#4  sjfan 02-25-2018, 02:30 PM
Quote slowfax
If there is a special character in an ebook (e.g. from a foreign language or a mathematical formula sign: ý, ƾ, ؾؾ, ∑ or similar), you can at least reduce the size of the fonts by using a (built in) Calibre plugin. I don't know the english name of the plugin. In German language it is called "Bücher perfektionieren", translated anything like "make your book perfect".
In English this is the “Polish books” option (the link tells you how to turn it on). The two options you mention are “Subset all embedded fonts” to reduce the fonts to just those characters needed, and “Losslessly compress images” to attempt to reduce image size without altering quality.
Reply 

#5  JSWolf 02-26-2018, 05:50 PM
Don't bother with Polish Books. You are better off with the Editor. It can do those two things. Plus a lot more like being able to remove the excess junk you don't need that I mentioned in the third message in this thread.
Reply 

#6  sjfan 02-26-2018, 06:16 PM
Quote JSWolf
Don't bother with Polish Books. You are better off with the Editor. It can do those two things. Plus a lot more like being able to remove the excess junk you don't need that I mentioned in the third message in this thread.
The editor is more flexible, but Polish Books is superior for dealing with multiple books (as in a full library like this).

You can select 100 books, run Polish Books, set the options you want for font subsetting, click start, and go have a cup of coffee while it handles them all.
Reply 

#7  JSWolf 02-27-2018, 06:11 AM
Quote sjfan
The editor is more flexible, but Polish Books is superior for dealing with multiple books (as in a full library like this).

You can select 100 books, run Polish Books, set the options you want for font subsetting, click start, and go have a cup of coffee while it handles them all.
This is true. But for example in the case of Penguin Random House books, there's stuff that can be deleted to reduce the size. Like the fonts they have for an advertising XHTML. Also, you can losslessly reduce using the default 80% and in most cases you won't see any compression artifacts.

So if you want to reduce eBook size as much as possible, you do have to use the editor.
Reply 

#8  geek1011 03-05-2018, 07:03 PM
If you know any programming/scripting languages, I'd just suggest making a tool to do exactly what you want. I can also second what JSWolf said about the Random House books. Those are actually pretty easy to automatically clean up, as every book has the same layout.

Another way I reduce the size is to reencode the cover images. This usually cuts a significant amount off the size.

My books, after stripping the unnecessary fonts and reencoding the cover image usually end up being ~300kb each.
Reply 

Today's Posts | Search this Thread | Login | Register