readium / SDKLauncher-iOS

A small iOS application to serve as a launcher/testbed for the Readium SDK.
BSD 3-Clause "New" or "Revised" License
71 stars 47 forks source link

Unable to open ePub file, app crashed.[iOS] #35

Closed BluePick closed 9 years ago

BluePick commented 9 years ago

SDK can not open attacked file , is there anyone have solution?? Here is the link of ePub file:

https://www.dropbox.com/s/xxx/yyy.epub

danielweck commented 9 years ago

SDKLauncher-OSX crashes as well (I'm investigating). The Chrome extension and cloud reader seem to handle this EPUB fine.

@BluePick Should the link to this EPUB remain private? (is there any distribution copyright involved?) In the meantime, I have mangled the DropBox link you posted in this public issue tracker. Feel free to reinstate it if you feel that this ebook can indeed be shared publicly.

danielweck commented 9 years ago

@BluePick your EPUB is missing crucial metadata (content.opf):

<meta property="rendition:layout">pre-paginated</meta>

and additionally:

<meta property="rendition:spread">auto</meta>
<meta property="rendition:orientation">auto</meta>

Furthermore, the SMIL durations are missing:

<meta property="media:duration" refines="#MANIFEST_ITEM_ID">0:00:00.000</meta>

I have now fixed the ReadiumSDK so that parsing of EPUB3 Media Overlays degrades gracefully in cases where the OPF duration metadata is missing or invalid (will push code to GitHub shortly).

However, you must explicitly specify that your EPUB is fixed layout (pre-paginated), otherwise it defaults to reflowable.

Regards, Dan

BluePick commented 9 years ago

@danielweck Thank you so much

danielweck commented 9 years ago

Regarding the "pre-paginated" missing metadata, I have filed a separate issue: https://github.com/readium/readium-sdk/issues/108 (not sure if readium-sdk should parse iBooks XML...to be determined)

danielweck commented 9 years ago

Fixed here: https://github.com/readium/readium-sdk/commit/c3f0a7a920870da295d02933926b6c1145c8dbf2