简体   繁体   中英

How to open pdf file using flash builder 4.5

How to read and display a pdf file using flash builder 4.5 and as3 for iOS application??

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.

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 (eg, 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM