![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26
Karma: 496542
Join Date: Dec 2011
Device: nook
|
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 |
![]() |
![]() |
![]() |
#2 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,948
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
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.
|
![]() |
![]() |
![]() |
#4 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
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).
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26
Karma: 496542
Join Date: Dec 2011
Device: nook
|
OPF
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? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26
Karma: 496542
Join Date: Dec 2011
Device: nook
|
Hi, I've upped the OPF. Thanks for looking.
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
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. |
![]() |
![]() |
![]() |
#8 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
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.
|
![]() |
![]() |
![]() |
#9 |
Digital Amanuensis
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
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. |
![]() |
![]() |
![]() |
#10 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,948
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 |
Berti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
I tried Jellby's approach of cutting down the id-strings (a bit modified by me
![]() 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. |
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26
Karma: 496542
Join Date: Dec 2011
Device: nook
|
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 |
![]() |
![]() |
![]() |
#13 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 117
Karma: 584308
Join Date: Oct 2010
Location: San Francisco
Device: Kindle
|
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. Last edited by Jeff L; 07-06-2012 at 12:14 AM. |
![]() |
![]() |
![]() |
#14 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 532
Karma: 3293888
Join Date: Oct 2011
Location: Virginia
Device: Nook Simple Touch
|
|
![]() |
![]() |
![]() |
#15 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
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. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
18MB EPUB converts to 40MB Mobi! What can I do to reduce Mobi file size? | perdman | Conversion | 11 | 12-09-2017 04:18 AM |
How do I reduce popup size for cover selection? | lizzielou | Calibre | 2 | 05-06-2012 04:41 AM |
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? | DHahn | Kindle Formats | 3 | 04-17-2012 04:06 AM |
opf file size bug - slow opening ??? | cybmole | Calibre | 18 | 09-06-2011 04:41 AM |
OPF file OPS/package.opf is missing | Run2Eat | ePub | 2 | 05-31-2011 06:52 PM |