How do i open PDFs with iBooks on iOS using Appcelerator ? - ios

I am trying to open pdfs in my application using ibooks but i could not find any solution for this. I am using Appcelerator for this. Please share code with me.

You can either use the DocumentViewear (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.DocumentViewer)
or a Webview to display a PDF.
When you have opened the PDF in the DocumentViewer the user can decide
With the action button to open the PDF in the reader he wants.
To open other apps you you have to use URL schemes
(http://wiki.akosma.com/IPhone_URL_Schemes#iBooks):
Titanium.Platform.openURL('ibooks://');

Related

Is it possible to load a pdf into my iOS app from iBooks?

I have an app that I'm using to create a custom PDF document (containing an image). I'm using my app the save the PDF into iBooks. I would like to be able to later access iBooks and get a copy of the document again.
I know that because of sandboxing, you used to not be able to load documents from iBooks into my iOS app. However, you weren't able to open PDFs with iBooks before and now you are - so is there a workout around for picking my own PDFs out of iBooks and loading them back into the app?
If not, how would I go about doing this? Are there examples or tutorials somewhere? (I'd like to select my own previously-saved pdf, from the same app, from iBooks like I'm able to select an image from the photo roll)
thank you!
iBooks are developed using iBooks Author, not Xcode. In addition, iBooks are for use with the iBooks application that is available for newer versions of iOS. They are not meant to be used within an iOS application.
So, sorry for the sad news. You can not integrate iBooks with your iOS apps.

How to support Open in feature in iOS App?

My app is PDF Reader and i want to support Open in feature like when open PDF in Safari , We can open PDF in another PDF Reader app with Open in Feature.
So my app support for (.PDF) file and want to show my app on the lists of Open in App like following pic.
I don't know what is that and how to use it?
Please explain or guide me to good tutorials.
Sorry if my question is duplicated.
It's very simple, you only need to register the file types that your app supports. You can check more on
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1

What will happen if I try to open a pdf in iBooks through my app if iBooks is not installed?

I've seen from Send PDF to iBooks how to format the link the open the pdf in iBooks, but if iBooks is not installed, will it just open it normally? Or will something break? (I know, I could just test this and find out, but may as well put it up here for anyone else with the same question.)
There are two ways to open a content in another app
1) [UIDocumentInteractionController presentOpenInMenuFromRect]
This will display only available apps. So, iBooks won't be displayed and you won't be able to open pdf in it
2) Usage of custom URL.
Application registers custom URL with the system. So, if iBooks isn't installed and it didn't register custom URL, the call will just fail (I am not sure what kind of error will it return).

How to open a pdf on the iPad from an AIR for iOS app

I am making an AIR for iOS app that can download pdfs. I do not want to display the pdf in the app itself but want the default pdf-viewer (iBooks) to launch and show the pdf. How can this be done.
I am aware that navigateToURL can be used to open a file with the uri scheme of iBooks. But i dont know how to tell iBooks to look in the app-directory of my app. (Or is there some secret directory to place the file in from within the app - where iBooks can find it)
I have a hard time figuring out what the expected behavior should be. I can open iBooks from the app, but where should i place the file so that iBooks can get to it?
Any pointers or help would be greatly appreciated as this is somewhat of a show stopper.
If simple navigateToURL won't work as expected, I'd suggest you to look at AIR Native Extensions (ANE) and UIDocumentInteractionController (+ blog post).
Try this library
http://code.google.com/p/pavo/
I haven't used it personally. It this works you will be able to extract text / content and render back in flash / flex application.

Open pdf file in iBooks from my site

I need put link to pdf files in my site with conditions..:)
If is a iPad , i want save this pdf in iBooks library and open iBooks showing this file.
Is this possible?
Tks!
No, this is not possible. When the user views the PDF in Safari and has iBooks installed, there will be a button to open it in iBooks (or other apps that can read PDFs). You cannot automate this though.

Resources