How to read and display a pdf file using flash builder 4.5 and as3 for iOS application??
Asked
Active
Viewed 4,116 times
0
-
you should look at this: http://stackoverflow.com/questions/2977637/open-pdf-in-flash-player-10 – Jevgenij Dmitrijev Jul 19 '11 at 08:07
-
You do not open a pdf in Flash Builder. Flash Builder is the IDE (Integrated Development Environment) for developing, debugging and profiling Adobe Flex / AIR / ActionScript files. You want open the PDF file in an AIR for iOS application. Flash Builder has no relation to the question. – Pranav Hosangadi Nov 15 '11 at 04:42
-
@Pranav Hosangadi: I think you should read my question carefully, i wanted to open pdf in iOS devices using flash builder 4.5 not in flash builder. – Swati Singh Nov 15 '11 at 04:58
-
You do not use Flash Builder to open pdf files, be it on iOS devices, or on desktop computers. FB is just the IDE, meaning it helps you in developing your application. The programming language (AS3) and framework (AIR) are what decide the code needed to display a pdf. – Pranav Hosangadi Nov 15 '11 at 05:04
-
Everyone knows including me that FB is an IDE so it is not necessary to mention everywhere that FB is IDE, and yes we develop our application in FB IDE and after that we run app on iOS devices so there are some feature or library in built in the SDK that can help us in making app. – Swati Singh Nov 15 '11 at 05:16
-
Pranav Hosangadi: you have upvote and downvote power so use it for encouraging people here. There is no sense to modify and downvote anyone's question when answers accepted it means that someone found their answer. – Swati Singh Nov 15 '11 at 05:33
-
@SwatiSingh: Please keep in mind that even unregistered people view answers on StackOverflow to solve their problems. By editing the question, I am not clarifying it for YOU, but for people who may view the question in the future. As for my upvote/downvote privileges, let me be the judge of how to or not to use them. – Pranav Hosangadi Nov 15 '11 at 05:51
2 Answers
0
i think the best solution would be to open it as a link in mobile safari.
navigateToUrl(new URLRequest('<pathToPdf>'));
have not coded AS for iOS so i hope the navigateToUrl method works.

Philipp Kyeck
- 18,402
- 15
- 86
- 123
-
thanx for reply but i am creating this for mobile application so that cant use navigateToURL. – Swati Singh Jul 19 '11 at 07:49
-
if you want to load the pdf from an URL, you can use navigateToUrl(URL) if it is bundled with you app, then user something like new File('app:/assets/test.pdf').nativePath or .url – Philipp Kyeck Jul 19 '11 at 08:30
0
package
{
import flash.display.MovieClip;
import flash.media.StageWebView;
import flash.geom.Rectangle;
public class StageWebViewExample extends MovieClip
{
var webView:StageWebView = new StageWebView();
public function StageWebViewExample()
{
webView.stage = this.stage;
webView.viewPort = new Rectangle( 0, 0, stage.stageWidth,stage.stageHeight);
webView.loadURL( "http://www.adobe.com" );
}
}
}
StageWebView.
http://help.adobe.com/en_US/as3/dev/WS901d38e593cd1bac3ef1d28412ac57b094b-8000.html
this won't work on Android 3 tablets. For activating any plugin (e.g., Flash or PDF) in the StageWebView you need to explicitly enable hardware acceleration in the description file. This part would be easy, but Flash CS 5.5 would not package your -app.xml since it checks against the Froyo lib and not the Honeycomb lib. Since the hardware accelartion is a feature of Honeycomb, it is unknown for CS5.5.

Swati Singh
- 1,863
- 3
- 19
- 40