![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5171130
Join Date: Jan 2006
Device: none
|
Attached is a test file that (still) won't open in my DE.
|
![]() |
![]() |
![]() |
#17 |
Manic Do Fuse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,312
Karma: 3325462
Join Date: Oct 2006
Device: Sony 500, 505, 350, Kindle 3, DXG, nook, Irex DR800SG, iPad
|
|
![]() |
![]() |
![]() |
#18 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,755
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Steve, the problem is with WinZIP. I downloaded the ePub file and decompressed it and then recompressed it with WinRAR and it works perfectly with DE for Windows.
Also, due to the size of the HTML file, it doesn't work with Mobile DE on the 505. Last edited by JSWolf; 09-29-2008 at 09:50 PM. |
![]() |
![]() |
![]() |
#19 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5171130
Join Date: Jan 2006
Device: none
|
That's very odd:
Hmm. Maybe the extra graphics caused that... |
![]() |
![]() |
![]() |
#20 |
reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,977
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
The problem is the single 759KB HTML file. ADE on the Sony has a 300KB per HTML file limit.
As Madam Broshkina says, if you run it through Calibre's any2epub it splits the HTML file into 5 pieces and also produces a correctly ZIPed epub. On the command line, use: Code:
any2epub -o test_calibre.epub test.epub If the items that in the TOC should be chapters (i.e. should have page breaks before them) then it is best to actually put each in a separate HTML file. Calibre can do this for you using the --chapter switch as explained in post #6 above. |
![]() |
![]() |
![]() |
#21 |
speaking for myself
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
|
Steve,
I have looked at the file and this is what I found. Your epub file is not quite proper zip file. Normal zip files should start with the sequence "PK\3\4" and your file starts with "PK00". This might be a marker that zip splitting is allowed - I am not sure, at least many zip utilities can process it. In any case, this is not a valid epub file. OCF spec has a very strict rule on the extra headers in zip format (they are prohibited). I have looked at our code and I am pretty certain that this file could not have ever worked in Digital Editions (1.0 or 1.5). I think something changed in your process. Look carefully into WinZip options. Peter |
![]() |
![]() |
![]() |
#22 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@Peter: I've noticed that ADE in general doesn't seem to believe in the philosophy of being liberal in what it accepts as input. You really should change that. For example, I've found that it refuses it display epub files that have html components that dont declare a namespace. I know that such files are not valid as per the EPUB spec, but, while being so zealous in following spec is welcome in a tool to create epub files, it is out of place in a viewer application.
And are there any plans to release a linux version sometime soon, or am I going to have to roll my own viewer? |
![]() |
![]() |
![]() |
#23 | |||||
speaking for myself
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||
![]() |
![]() |
![]() |
#24 | ||||
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Quote:
Quote:
Quote:
|
||||
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5171130
Join Date: Jan 2006
Device: none
|
@Jon: I tried WinRAR late last night, using it the same way I'd use WinZip. The ePub file came out fine for me, too.
I'm still at a loss to understand why WinZip worked for me once, then not now, when I know I haven't changed anything. I'll have to look into WinZip closer, to see if something changed inadvertently. @Peter, I didn't know anything about the "PK00" sequence. But everything else about the ePub files was the same with the older and latest sets, and the older sets opened fine. As another recent example, I have an ePub of "6 of One..." on my site, which opens fine in DE, created with the same tools. (It's free, so feel free to check, compare and contrast.) How do I check the older epub documents to see which "PK" sequence is on them? @Wallcraft, my earlier ePubs were broken up into individual HTML chapters. I didn't bother for the original test piece, but I believe the final test piece I posted was a Book Glutton ePub in one big file, shifted to .zip and back to .epub. (I've done so many tests, even I have to go back to make sure!) Anyway, any future novels will be in individual chapters. @Kovid, I may still try to use Calibre, but I haven't gotten it to format properly yet... my initial attempts met with errors that I am still trying to work out (and which I may get back to you directly with questions, after I've exhausted the help file). Last edited by Steven Lyle Jordan; 09-30-2008 at 09:00 AM. |
![]() |
![]() |
![]() |
#26 | |||
reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,977
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Quote:
test.epub has: Quote:
Quote:
It is hard to see why any ePub viewer would care about this, since its built in unzip probably still works. It it does care, then it needs to be explicit about what the problem is. |
|||
![]() |
![]() |
![]() |
#27 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sure, calibre's epub support is far from mature (its only a week old) so any feedback is welcome.
|
![]() |
![]() |
![]() |
#28 | ||||||
speaking for myself
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
|
Quote:
Quote:
Quote:
We do not go extra mile to weed out the broken content, but we won't go extra mile to support the broken content either. (Both are bad for the battery, BTW). Quote:
Quote:
Quote:
![]() |
||||||
![]() |
![]() |
![]() |
#29 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Well, to each his own, but, I have a question for you with regards to html2epub. I find that ADE doesn't resize text if absolute font sizes are used (e.g. px or pt). So I've written code to convert absolute font sizes to relative font sizes. But I had to reverse engineer the algorithm ADE uses to calculate the final rendered font size. Can you either give me that algorithm or look at my code and tell me if it is correct?
Basically the algorithm I use is: Code:
ptu = { # Convert to pt 'px' : 1.0, 'pt' : 1.0, 'pc' : 1/12., 'in' : 72., 'cm' : 72/2.54, 'mm' : 72/25.4, } val = (val * ptu[unit])/base In my testing the values in ptu above most closely replicate final rendered font sizes. |
![]() |
![]() |
![]() |
#30 | |
speaking for myself
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
|
Quote:
To keep text resizable you pretty much always have to use em unit or percentage. For most content, it is sufficient to just scale the absolute value to the fraction of the default font size (which I think is somewhat what you are doing). However this does not work well if there is a block of text that uses a particular font size and a subblock in it that also sets its own font size. The problem there is that per CSS rules relative font size is given relative to the parent element, so relative font size for the inner element has to be given relative to the outer element, not relative to the default size. When size comes from CSS, this may be pretty hard to fix. Longer term, I think we need to support CSS3 "rem" unit which is font size relative to the root element. It would work much more reliably, but we'll need to get IDPF blessing for that. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with Libre 18g upgrade | Desertway | Ectaco jetBook | 22 | 09-03-2010 11:24 PM |
Epub problem since upgrade | SandraM | Kobo Reader | 4 | 07-29-2010 06:40 PM |
Gen3 Old Cybook / upgrade firmware to ePub | AlexBell | Bookeen | 8 | 05-23-2010 07:36 AM |
PRS-500 hacks after upgrade to epub | htaylor | Sony Reader Dev Corner | 4 | 12-14-2009 11:21 PM |
Another firmware upgrade coming to support Hyperlink in EPUB | Robertb | Astak EZReader | 12 | 09-11-2009 09:46 AM |