简体   繁体   中英

Open a PDF file in a flex app mobile

Hy,

I use this method to open a web page into my flex mobile application and I want to now if is possible to make the same for an PDF file.

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
title="Test">


<fx:Script>
    <![CDATA[

import flash.net.URLRequest;
import flash.net.navigateToURL;
import flash.display.MovieClip;
import flash.media.StageWebView;
import flash.geom.Rectangle;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.desktop.NativeApplication;
import mx.events.FlexEvent; 
private var browser:StageWebView;
protected function onButtonClicked(event:MouseEvent):void
{
    browser = new StageWebView();
    browser.viewPort = new Rectangle(0, 0, 100, 200);
    browser.stage = this.stage;
    browser.loadURL("http://stackoverflow.com");
}       


]]>
</fx:Script>

<s:Button x="209" y="67" label="test" click="onButtonClicked(event)" />

Have a look at our GPL library for FlexPaper. It contains all you need to display documents in a Flex mobile app.

https://code.google.com/p/flexpaper/

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