epub3

ePub and Javascript

你。 提交于 2020-01-12 10:15:30
问题 I'm using a MacBook Air and have been looking into ePub creation. I've taken a copy of the epub3 boilerplate from github click here. I have in a javascript file added the following var txt = document.createTextNode(" This text was added to the DIV."); document.getElementById('contenty').appendChild(txt); <script src='../js/main.js'></script> When I open the compiled epub in iBooks it doesn't show This text was added to the DIV. in the div #contenty . Using Kitabu it actually works but is

iBooks: is it possible to use localStorage when importing a *.epub file?

ぃ、小莉子 提交于 2019-12-24 18:28:53
问题 I'm trying to create a sample epub file that I can read in iBooks that will contain interactive content that iBooks will access via localStorage. I am able to get the localStorage piece working on the browser aok in chrome and firefox (not IE). I noted that the localStorage javascript bit does not work when the files have *.xhtml extensions, only *.html extensions. I am able to zip up the html, opf and ncx and get an epub that I can read in digital editions and only throw epubcheck errors

Count total number of pages in epub

时光怂恿深爱的人放手 提交于 2019-12-12 03:05:32
问题 I am new with epub. I have many different epub format files and i am going this file readable online. I don't have much idea about what is in epub file ? There is any way so i can know how many pages in my epub file ? I can do it using xml , javascript , PHP or any other way if you have. 回答1: Epub files are responsive ebooks which changes number of pages according to screen size. Also the page numbers depends on the viewer application & device. 回答2: An EPUB file is basically a ZIP file which

unzip downloaded zip file using SSZipArchive

偶尔善良 提交于 2019-12-11 17:41:42
问题 the code i used for downloading the book is .. //Create URL to the source file you want to download let fileURL = URL(string:myFileURL) let sessionConfig = URLSessionConfiguration.default let session = URLSession(configuration: sessionConfig) let request = URLRequest(url:fileURL!) let task = session.downloadTask(with: request) { (tempLocalUrl, response, error) in if let tempLocalUrl = tempLocalUrl, error == nil { // Success if let statusCode = (response as? HTTPURLResponse)?.statusCode {