URL protocol/mimetype to autoload epub file on Nook? - epub

For iphone, I use the "stanza://abcd.epub" url format to automagically startup the Stanza reader and autoload the abcd.epub book.
On the color nook, I tried a url with the epub mimetype "application/epub+zip".
The epub downloaded to the "My Downloads" folder on the color nook. It was not added to the nook's library. When I navigated within the nook to the downloads file, it was able to read and display the file.
Question Is there a way to download and automatically add an epub to the color nook's library or to autoload an epub and start displaying it to the user?

Auto(down)load is probably possible by writing an app that starts on android-boot.
But I believe that you have to add your ebook to the nook store or it will not be listed within the library.

Related

How to highlight text in pdf using PdfKit

I am creating app where i need to load the pdf file from document directory and need to highlight text manually by user.
Also we need to export the updated pdf file and upload it to the server.
Is there any way to manage the same using pdfkit ?
Please share the sample code if available.
We are using the library as a reference is listed below
https://github.com/uxmstudio/UXMPDFKit
This library is using the same concept as we need but exporting the pdf is the main task we need to achieve.
In simple word we can say that user can highlight some text from the displayed pdf text and upload it to the server.

Is it possible to access the iBooks PDF files from my custom application

I read and read Blogs in google but still could not draw the conclusion regarding,Can we upload the iBooks PDF files through the custom application? some says "No, there is currently no way to access this information"
I have a application like Gmail. now i want to send mail that may be image or PDF files. I can easily attach the Image files from my phone but could not excess the PDF from my iBooks.
Is it mandatory that PDF must be uploaded through iClouds?
Hope i could draw the conclusion regarding this Problem,from here..

fetch Cover Image from epub in ios

I want to display Book Cover Image of epub file in my Reading table. In my iOS application I have added "Open In" support for epub files. So when i navigate to my book reading app I want to show book's cover image in shelf first and then want to load that book. Please help me to fetch Cover Image from epub book in ios app.
You will have to unzip the ePub and parse the metadata.
Parse META-INF/container.xml and find the .OPF file path.
The .OPF file contains all that you need, a tag meta with name cover that refers to a tag item, this is the image cover.
You can copy this image to somewhere and delete the unzipped files.
PS: I am the creator of FolioReaderKit an ePub Reader and Parser written in Swift 2, this is where I get the book cover FREpubParser.swift. If you don't want to deal XML you can read the ePubs using it, it will also parse the metadata and exposes for you.

PDF generation in XCode

I am a newbie in iPhone development. I am planning to do a PDF application for iPhone. The functionality is:
User will type their input in a text field (which is going to be the content of the PDF file).
I have to modify the PDF file through code while saving (paragraphs, tables, bullets etc).
User can save it in their own name.
User can send the PDF file as attachment of MFMailComposer.
So I have searched and got many links. However I didn't find any leading details to create and modify a PDF file in iPhone/iPad.
Can anyone please provide me a good reference to do this. Are there any alternatives to do this?
I've used this reference: https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
It contains theoretical explanations and source code examples
Please use the below link to download sample apps for PDF Reader/Viewer in iOS
PDF Reader/Viewer in iOS
Also please look at detail about pdf creation, manipulation etc in below links
developer.apple: PDF Document Creation, Viewing, and Transforming
Fast-and-lean-pdf-viewer-for-iphone
If you were doing a Phonegap app I'd say got for jsPDF, which would enable you to create (basic) PDF files in Javascript. I don't do Obj-C, but a quick look on SO provides good links.

Reading ePub format

I am trying to develop an iPhone application to read ePub files. Is there any framework available to develop this? I have no idea about how to read this file format. I tried to parse a sample file with .epub extension using NSXML Parser, but that fails.
The EPUB format brings together a bunch of different specifications / formats:
one to say what the content of the book should look like (a subset of XHTML 1.1 + CSS)
one to define a "manifest" that lists all of the files that make up that content (OPF, which is an XML file)
one to define how everything is packaged up (OEBPS: a zip file of everything in the manifest plus a few extra files)
The specs look a bit daunting but actually once you've got the basics (unzipping, parsing XML) down it's not particularly difficult or complex.
You'll need to work out how to download the EPUB, to unzip it somewhere, to parse the manifest and then to display the relevant content.
Some pointers if you're just starting out:
parse xml
unzip
To display content just use a UIWebView for now.
Here's a high level step by step for your code:
1) create a view with a UIWebView
2) download the EPUB file
3) unzip it to a subdirectory in your app's documents folder using the zip library, linked above
4) parse the XML file at META-INF/container.xml (if this file doesn't exist the EPUB is invalid) using TBXML, linked above
5) In this XML, find the first "rootfile" with media-type application/oebps-package+xml. This is the OPF file for the book.
6) parse the OPF file (also XML)
7) now you need to know what the first chapter of the book is.
a) each <item> in the <manifest> element has an id and an href. Store these in an NSDictionary where the key is the id and the object is the href.
b) Look at the first <itemref> in the <spine>. It has an idref attribute which corresponds to one of the ids in (a). Look up that id in the NSDictionary and you'll get an href.
c) this is the the file of the first chapter to show the user. Work out what the full path is (hint: it's wherever you unzipped the zip file to in (3) plus the base directory of the OPF file in (6))
8) create an NSURL using fileURLWithPath:, where the path is the full path from (7c). Load this request using the UIWebView you created in (1).
You'll need to implement forward / backward buttons or swipes or something so that users can move from one chapter to another. Use the <spine> to work out which file to show next - the <itemrefs> in the XML are in the order they should appear to the reader.
Apparently EPUB is "just" an XML format, so if you have an xml parser and the spec it should be okay.
Plus a little tuto? Have fun!
EDIT: you could also read some code here, this is for generating epub, not reading them but the code may be useful.
EDIT again: And see links to related question in the right sidebar, there are some links in the answers to free ebook reader which support ePub.
EDIT 3: You should add a comment when you edit your question so people who answer you can continue the discussion (if you don't comment we're not noticed of your edit).
So, The parsing fail because you didn't read the spec or related questions on Stack Overflow... *.epub file are a zipped folder containing XML file(s), not plain xml.
I read through this tutorial once (free registration required, sorry) and it gave me a great introduction to ePub. deverloperWorks tutorial here
I highly suggest you look at some of the XML processing libraries. If you just want to get specific information out of the XML file, then you can pick the right parsing strategy.
there is an open source project fbreader,
it also support iphone
http://www.fbreader.org/about.php
I'm playing arround to create an epub-framework for iphone apps.
At the moment (I really just startet) i can generate a title page with links to the chapters.
My approach is
Use quickconnect iphone framework as
a layer (maybe i change to phonegap)
which basically allows for javascript
apps as iphone apps
Add the UNZIPed epub as a ressource to the project
Parse the whole thing with a customized version of the epub.js (somewhere on google-code)
Right now I'm looking into pageflip, some kind of gui and minor usability issues (save the current page beingviewed)
I hope that give's you an idea on how to start
Jonathan Wight (schwa) has developed a ObjC solution for parsing and displaying ePub documents on the iPhone. It's part of his TouchCode open source repository.

Resources