So I’m finishing an AIR app that will be deployed for both Android and iOS phones.
I wanted to include a manual that explains in detail how to use the app.
First, I wrote the instructions manual in english, french and spanish on WORD.
It turned out that each document weighs 8Mo with 20 pages and dozen of pictures.
Tweeking the DPI, each file converted to PDF weighs now 0.5Mo.
My goal is: How to include this manual within my app, preferably without an external reader, and internet connection, and with smooth and intuitive document navigation.
My researches on the net led me to quite a few solutions, I Would like to share them here, and collect from you as much ideas and opinions please.
Including a PDF reader within my app to read internal PDF file (PDF from the application storage directory)
PROS: The pdf is always available for the user, no need for an internet connection or an external reader.
CONS: Given that the ANE lister below work for one OS only, I will need to write different code for android and iOS environment. Not sure also if the ANE below will be compatible with latest 64bits OS versions (some are not updated on the last 2 years).
- PDF Reader ANE for iOS (free): https://github.com/memeller/vfrReaderNativeExtension (some app crashes reported on some forums)
- PDF Reader ANE for iOS ($10): http://airnativeextensions.com/extension/com.distriqt.PDFReader
- PDF Reader ANE for Android (free): https://github.com/janumedia/PDFReaderANE
- PurePDF (not an ANE, but an AS3 class, not sure if compatible with both OS): https://github.com/sephiroth74/purePDF
Anybody used PurePDF? Since it’s 100% AS3 code, it should work on all OS, sounds promising. But I have no clue how to use it!!
2 Launching an external PDF reader to read an internal PDF file (within the app).PROS: Perhaps the same code may work for both OS with use of openWithDefaultApplication() method.
Some users on forums find issues pointing to the internal PDF file especially on mobiles.
CONS: Obviously, if the user didn’t install a PDF reader, he won’t be able to read the document.Some ANE are also available to achieve this goal:
- ANDROID: PDF Reader ANE (opens default PDF reader on Android - $5): http://myappsnippet.com/pdf-reader-air-native-extensions/
ANDROID: PDF Reader ANE for Android (free): https://github.com/janumedia/PDFReaderANE
- ANDROID: DocLauncher ANE ($7, no longer available): http://activeden.net/item/document-launcher-native-extension-for-android/gone/2015733
iOS: ANE DEVICE FILE UTIL (free and supports iOS 64bit): https://github.com/katopz/ane-device-file-util
3. Convert my PDF to a SWF, then display it in my app.
Using special tools, I convert my PDF to a SWF, then I embed it in my IPA or APK.
PROS: It works on desktop. Also, some of the tools below offer a navigation interface and zoom option.
CONS: I haven’t figured out how to embed the SWF in my final IPA or APK (after adding the SWF to Flash CS6 FLA library), also the navigation interface is not customizable to fit mobile environment.Links:
- PDF2SWF from SWF tools (free): http://www.swftools.org/download.html
- PDFMate PDF converter (free, pro version $40): http://www.pdfmate.com
Creating a movieclip with a lot of frames (+50); then divide my document content across the frames and paste my text inside textFields. Then add some basic navigation buttons.
PROS: 100% multi-platform solution.
CONS: Time-consuming. You may lose your layout. You lose the zoom feature usually found in PDF readers. Scrolling up and down is not smooth. Text length inside Textfield is limited etc..
Launching an external PDF reader to read an external PDF file (stored in a server).
PROS: Perhaps the same code may work for both OS.
CONS: User needs an internet connection and an installed PDF reader.I will have to pay for a remote storage service that will (maybe) impose a download limit.
on iOS: Online PDFs can be opened via navigateToUrl and then imported into iBooks.
Use StageWebView class (or StageWebViewBridge class) to display an HTML file (after converting my PDF to HTML).
CONS: It seems tricky to embed the HTML file with its pictures inside the final IPA or APK file.
The irony is that ADOBE is the creator of the PDF format, and AIR is at its 17th major update.
But to my knowledge, no easy and satisfying solution is offered by AIR to display PDF on all platforms.
Does anybody of you know a multi-platform solution to display pdfs, with nice performance (smooth scrolling and zoom)?
The reader should have page thumbs, basic controls (next/previous page etc.) and shall read pdfs in local storage or online (as last resort).
Waiting for your kind replies!