epub

P tag not rendering correctly in iBooks 2.0.1

橙三吉。 提交于 2019-12-23 03:56:47
问题 I have an EPUB created with InDesign 5.5 and am trying to use the built-in Futura on the iPad. H1 and H2 tags render properly in iBooks 2.0.1 but P tag and classes default to Times Roman. I've tried the samp hack, but no luck. Here's an example: p.Narrative-Body { font-family : Futura, Arial, sans-serif; font-weight : normal; font-style : normal; font-size : 1em; font-variant : normal; line-height : 1.6; text-align : left; color : #000000; } and here's the html: <p class="Narrative-Body"

Getting XHTML from DRM EPUB

微笑、不失礼 提交于 2019-12-23 03:25:10
问题 I'm currently using the Adobe RMSDK to read DRM EPUBs. It renders an EPUB page as an image, and sends it back to be displayed on the device. I would really like to have access to the EPUBs XHTML, to display it in a webview. I have been able to unzip the EPUBs and browse the different chapters, but the content is still encrypted. Is there anyone that have any idea how I can accomplish this? I'm using Xcode 4.2 , Objective C/C++ Regards, EZFrag EDIT 1: I already combed through the whole RMSDK,

Extract text between two links in HTML through Java

让人想犯罪 __ 提交于 2019-12-23 01:59:09
问题 I am trying to retrieve the text data from an ePub file using Java. The text of the ePub file lies within a HTML file that is formatted something like this - <h2 id="pgepubid00001">Chapter I</h2> <p>Some text</p> <p>Another line of Text</p> <br/> <h2 id="pgepubid00001">Chapter II</h2> etc.. Before opening this file I already know the id of the Chapter I need to extract and can find the id of the next chapter too. Because of this I thought a logical approach would be to attempt to parse it in

FInding out when page is being viewed in EPUB FXL via Javascript

*爱你&永不变心* 提交于 2019-12-22 11:21:06
问题 Is it possible to find out when a page of an EPUB Fixed Layout is being viewed with Javascript? There is the DOMContentLoaded event, but the adjacent pages also fire this event when they are preloaded in iBooks, causing animations or sounds to start before the page being visible... 回答1: No, it's not. This is a "feature" of iBooks. It preloads the pages, I suppose to make page turns faster later on. Unfortunately, there is no way to detect that a page is preloading as opposed to being actually

breadcrumb titlebar in Kindle book

断了今生、忘了曾经 提交于 2019-12-22 08:39:33
问题 Some books or periodicals from Amazon Kindle store have this cool feature that shows a breadcrumb or title bar when you read them. It shows up as the first line of the text. It is not the bar that has the battery and wireless signal icons. It is that first line underneath, right above the content. For example, if you are in the middle of chapter 2 it shows the title of the chapter in that line. It is really cool and I would like to implement that in my books. I have proper TOC, cover and

render the epub book in android?

戏子无情 提交于 2019-12-21 05:11:16
问题 I am try to show epub book in android pad. I can parse the html and css, in order to show the book's content and format, perhaps the book include pictures, It seems that I have two option: use Webview. Write a customer view, so that it can render html/css --- it seems a very complicated task. Which is the good way? If I have to use WebView, how about the page break logic, since webview parse one html file in one page, I can not find the page break in webview. 回答1: Nice One, But in Question...

Open epub files in PHP

喜你入骨 提交于 2019-12-21 05:09:12
问题 I want to open an .epub document with PHP, to modify it (for example to add some text on the first page and last page) and to save it back to .epub I found some classes for saving a text into epub file, but I can't find anything about opening an epub in PHP. 回答1: epub files are just HTML+CSS files inside a ZIP archive (called the Open Container Format (OCF) ) files with a different file extension :) So you can use PHP's ZipArchive class to work on the file. 回答2: There are libraries that

Reading a decrypted file into a ZipInputStream truncates first file sometimes

爱⌒轻易说出口 提交于 2019-12-20 07:27:19
问题 I'm working on an e-reader app (using skyepub) that basically downloads encrypted books into the file system (and it saves is decryption key in the database), and when the user tries to read it it loads the book into memory and decrypts it. The problem is that some books have their first chapter truncated (epub books are actually zip files, with each chapter being a separate file).. this result in this dreaded error: this XML file does not appear to have any style information associated with

How to open a file on iBooks

主宰稳场 提交于 2019-12-19 11:49:21
问题 How can I open a book on iBooks? I tried the following code, that works, but asks the user to choose an application to open the file: self.docController = [UIDocumentInteractionController alloc]; //leaves only the file name NSString *bookFile = @"my-book.pdf"; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex: 0]; NSString* filePath = [documentsDirectory stringByAppendingPathComponent: bookFile

JavaScript doesn't work on ICS

廉价感情. 提交于 2019-12-19 10:22:04
问题 I am working on EPUB reader for the company using JavaScript, the application runs well on Android 2.2, but when i try it on ICS & HoneyCom, the JavaScript doesn't work well. The first problem i faced, the WebView doesn't load JS files ( Unknown Error -6 ), so i used this solution: @TargetApi(11) @Override public WebResourceResponse shouldInterceptRequest(WebView view, String url) { Log.d("shouldInterceptRequest", url); InputStream stream = inputStreamForAndroidResource(url); if (stream !=