![]() |
How to reduce size of opf file???
Hi,
I'm trying to upload some eBooks to Apple's iBookstore, but I keep receiving rejections due to two my eBooks having opf files with a size over 300k. (one opf is 310k and the other 415k) These are very large books, but they validate fine and are accepted by B&N. I'm using Atlantis to create the ePubs from my Word files. Can anyone tell me how to get the opf files below 300k so they'll be accepted by Apple? Thanks! Karen |
Quote:
|
Those are big opf-files. For a text file to be 310k or more, that is a lot of text. The only way I can explain it, if you have a lot (and I mean a lot) of files in your ePUB with long names. Also you could take a look at your metadata.
|
Use short filenames, and short (or no) directory names. Remove unneeded metadata. Use ASCII characters instead of Unicode where possible. Open the OPF in a text editor and remove all unneeded spaces (spaces at the beginning of a line, for example).
|
OPF
1 Attachment(s)
Hi,
Here's the opf. I can't see any spaces or file names to get rid of. Anyone know how I can get this down below 300k? I need the file accepted by Apple, so I'm worried I'll cut some thing that will make them reject it again. Why do they insist on this 300k rule? |
Hi, I've upped the OPF. Thanks for looking.
|
I don't know why Apple has that restriction. I don't understand most things Apple do. It is not about size, since nowadays they want your covers to be large.
Anyway, there is not much you can do directly to minimize the opf-file. But, there are a lot of files. You could try to merge several html files to minimize the number of files. That has no impact (no real) on the filesize, but has impact on the opf file size. |
Indeed, the OPF is pretty minimalistic already. You can shrink it a bit though, by replacing "id with "a and "img with "b. And, if you can rename files, you could replace .html with .h and move all images to the root directory (thus removing the "images/" part in the file names. These changes make it smaller than 300kB.
|
I think that you can omit the file extensions at all, as I have not been able to find a place in the specs where it says that file extensions are required.
A quick trial EPUB with stripped file extensions passed both FlightCrew and EpubCheck, and it is displayed correctly. This should save you some more bytes. |
Quote:
|
1 Attachment(s)
Quote:
I guess you can toss out the line-breaks as well, which will be another 8k. Removing file-extensions will be some 15k. (I would not do that). I've still no idea how to squeeze out 115 k from your second *opf without reducing the number of entries. |
Thanks to you all for taking the time to help. Using your excellent advice I've managed to shave it down to 285kb - very slim indeed! As for the other eBook, I've had to make cuts to get it accepted. Once again thanks all - greatly appreciated.
Karen x |
Is it necessary to have so many files? You could combine the files to have fewer entries in the OPF. This would help with your other OPF that's 415K in size.
If you need pagination, you could accomplish that with page-breaks, like this: <br clear="all" style="page-break-before:always"/> Or put something in your CSS: .break { page-break-before: always; }Then use <div class="break"></div> where needed. |
Quote:
|
Quote:
Would it not be possible to group your XHTML files? I really think that would be more sensible than messing around with the structure of the content.opf file. I wonder what the toc.ncx file looks like. Could we have a look at one of your XHTML files? I have done ebooks with fewer paragraphs than you have XHTML files. |
| All times are GMT -4. The time now is 10:57 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.