Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2009, 10:57 AM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
ePUB with PDF embedded test

As I pointed out in this post, the ePUB spec allows including PDF documents as alternative renderings for chapters.

This is a test for this feature. It is my version of "Gulliver's Travels", with a PDF version of each chapter (at 9×12cm), and the standard XHTML as a "fallback". According to the spec, a reading system that supports PDF could show the PDF version, while those that don't will display the normal (XHTML) text. I don't know, however, if there is any system that supports this, but it may be worth testing.

The first thing I notice is that the book becomes huge. The normal ePUB version is 500 kB, the PDF version is 1.8 MB, and this "hybrid" version is 14MB! This is size increase is due to splitting the PDF in one file per chapter. I could include the whole book as a single PDF, but then I'd have to put all the XHTML text in a single file too (the alternatives are defined on a per-file basis).

So, feel free to try this in your readers (PC software or portable) and report any success or problem

PS. The technique is very easy, just check the "content.opf" file. In the manifest use:

Code:
<item id="Preface-1_pdf" fallback="Preface-1" href="pdf/Preface-1.pdf" media-type="application/pdf" />
<item id="Preface-1" href="Preface-1.xhtml" media-type="application/xhtml+xml" />
and in the spine:

Code:
<itemref idref="Preface-1_pdf" />
Attached Files
File Type: epub Gullivers Travels.epub (13.17 MB, 498 views)

Last edited by Jellby; 09-01-2009 at 11:06 AM.
Jellby is offline   Reply With Quote
Old 09-01-2009, 11:09 AM   #2
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by Jellby View Post
As I pointed out in this post, the ePUB spec allows including PDF documents as alternative renderings for chapters.

This is a test for this feature. It is my version of "Gulliver's Travels", with a PDF version of each chapter (at 9×12cm), and the standard XHTML as a "fallback". According to the spec, a reading system that supports PDF could show the PDF version, while those that don't will display the normal (XHTML) text. I don't know, however, if there is any system that supports this, but it may be worth testing.
Does it work for you, Jellby? I won't be able to check until later today.

And yeah... the splitting of PDF files is unfortunate. Though presumably the necessity to "physically" break up ePub's HTML components will decrease as processing power and memory in eBook reading devices increases.

Edit: Is there a way to give PDF primacy over the XHTML? i.e.: Try to suggest to the viewer to display PDF, and consider the XHTML as the alternate? If so, these sort of multi-layout editions could be manually tweaked by those wishing to view in the alternate format. Not terribly elegant--but a start.

- Ahi
ahi is offline   Reply With Quote
Advert
Old 09-01-2009, 11:29 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by ahi View Post
Does it work for you, Jellby? I won't be able to check until later today.
I have no ePUB reader

My CyBook (Gen3) does not support ePUB (yet, and I'm not sure if I'll install the ePUB or Mobi firmware when it comes). I have ADE installed in another computer with Windows, but I don't feel like turning it on and fighting with the sloppy Windows network or looking for a pendrive...

Quote:
Edit: Is there a way to give PDF primacy over the XHTML? i.e.: Try to suggest to the viewer to display PDF, and consider the XHTML as the alternate? If so, these sort of multi-layout editions could be manually tweaked by those wishing to view in the alternate format. Not terribly elegant--but a start.
Actually, as it is done PDF is the preferred format. The XHTML version is like a "last resort" option, it would be used only if the PDF cannot be displayed (because it's not supported). Every file that's not in one of the basic file types (XHTML, PNG, SVG, JPG) must have a fallback file in one of those types defined. Hopefully, reading systems in the future will let the user select which source to use when there are different alternatives available, but I doubt it's the case now, especially for ADE, which doesn't let you change even the margins or font!
Jellby is offline   Reply With Quote
Old 09-01-2009, 02:36 PM   #4
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Alright. Here's my brief report on this. The file opens fine in both ADE and Sony eBook Library. However, the PDF pages display at about 1/4 size and in the upper left corner of the window. Loading the file onto my 505 via USB results in an unopenable file. The title/author metadata is being read, but otherwise it thinks it's a 1 page file with no TOC. Attempts to open it throw up a 'Page Error!' message (took about a minute to get to that message the first time I tried opening it).

A cursory look at the guts of the file show that each PDF has about 30 fonts subsetted, which likely explains the relatively large size of each file. Unfortunately, it doesn't look like any fonts can be unembedded using Acrobat Pro. I was hoping that if the PDF didn't have any fonts embedded in it that it might try to use the reader's available fonts via the res:///Data/ path (similar to Acrobat's Use System Fonts switch). Of course, had this worked it would then bring up the question of how to get users to install the correct fonts on their readers...But whatever, it didn't work.

I'll fiddle around with it a bit more and let you know if I see anything else.
Abecedary is offline   Reply With Quote
Old 09-01-2009, 04:46 PM   #5
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
How about trying to create a single chapter document with a clean, lean, LaTeX generated PDF file. Use this, if nothing better is available.
ahi is offline   Reply With Quote
Advert
Old 09-02-2009, 05:10 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Abecedary View Post
A cursory look at the guts of the file show that each PDF has about 30 fonts subsetted, which likely explains the relatively large size of each file. Unfortunately, it doesn't look like any fonts can be unembedded using Acrobat Pro. I was hoping that if the PDF didn't have any fonts embedded in it that it might try to use the reader's available fonts via the res:///Data/ path (similar to Acrobat's Use System Fonts switch). Of course, had this worked it would then bring up the question of how to get users to install the correct fonts on their readers...But whatever, it didn't work.
Yes, I forgot about it... That's due to the microtype LaTeX package. Text lines are slightly expanded or compressed to make the text/whitespace ratio look more uniform, that's achieved by using expanded or compressed versions of the same font. I could disable this feature, but then the typographic quality wouldn't be so good, and the reason for using PDF wouldn't be so strong

But I don't think that should prevent the Sony reader to open the PDF, this PDF uses the same "trick", and as far as I know opens fine everywhere.
Jellby is offline   Reply With Quote
Old 09-02-2009, 05:24 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Abecedary View Post
Alright. Here's my brief report on this. The file opens fine in both ADE and Sony eBook Library. However, the PDF pages display at about 1/4 size and in the upper left corner of the window.
I have just tried it now in ADE with Wine, and there's not only the size problem, but it automatically trims the margins, as can be seen in pages 29-32. But at least text search and selection seem to work.
Jellby is offline   Reply With Quote
Old 09-02-2009, 06:17 AM   #8
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Quote:
Originally Posted by Jellby View Post
I have just tried it now in ADE with Wine, and there's not only the size problem, but it automatically trims the margins, as can be seen in pages 29-32. But at least text search and selection seem to work.
I meant to mention that, too. IIRC, it wasn't doing that in the Sony desktop software.
Abecedary is offline   Reply With Quote
Old 09-02-2009, 12:59 PM   #9
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Abecedary View Post
However, the PDF pages display at about 1/4 size and in the upper left corner of the window.
I wonder if that's due to the absolute page size of the PDF. It's generated for a 9×12cm page, would it be displayed larger if the page were 18×24cm?
Jellby is offline   Reply With Quote
Old 09-02-2009, 01:45 PM   #10
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Quote:
Originally Posted by Jellby View Post
I wonder if that's due to the absolute page size of the PDF. It's generated for a 9×12cm page, would it be displayed larger if the page were 18×24cm?
No idea, but a similar thought went through my head when I was looking over the PDFs yesterday. Only one way to find out.
Abecedary is offline   Reply With Quote
Old 09-02-2009, 01:57 PM   #11
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by Abecedary View Post
No idea, but a similar thought went through my head when I was looking over the PDFs yesterday. Only one way to find out.
We're going to build a giant wooden horse?

I'm saddened that it doesn't seem to work at all on the Sony PRS-505.

- Ahi
ahi is offline   Reply With Quote
Old 09-02-2009, 03:28 PM   #12
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Did anyone try on the Opus?
Jellby is offline   Reply With Quote
Old 09-02-2009, 03:33 PM   #13
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Quote:
Originally Posted by ahi View Post
We're going to build a giant wooden horse?
Exactly! And the genius of my plan is that we're going to build it around us.
Abecedary is offline   Reply With Quote
Old 09-02-2009, 03:35 PM   #14
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by Abecedary View Post
Exactly! And the genius of my plan is that we're going to build it around us.
Sir! I have a doubt!

How will this giant wooden horse impact typographic quality?

- Ahi
ahi is offline   Reply With Quote
Old 09-02-2009, 03:59 PM   #15
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by ahi View Post
How will this giant wooden horse impact typographic quality?
If everything goes as planned, there will be lots of orphans and widows
Jellby is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pdf embedded notes dragoo Calibre 0 09-26-2010 11:14 PM
Embedded fonts in epub erik5000 ePub 7 12-08-2009 11:55 AM
How to create non-embedded Unicode EPUB,LRF,TXT,RTF,PDF alexmobile Sony Reader 1 09-23-2009 10:04 PM
ePub embedded fonts JSWolf Ectaco jetBook 9 09-14-2009 08:43 PM
ePub + Embedded Fonts Cygfrydd ePub 11 03-02-2009 05:56 PM


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


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