Are you targeting Android devices too with your mobile application? If so, you 
should stay away from loading PDF-Urls with StageWebView, since this afaik only 
works on iOS devices. The reason for this is that StageWebView uses your 
device's system browser engine to render HTML. That's why it works in the 
debugger, but I don't think it will not work on Android devices. 

Just an addition to Jude's solution.

-----Ursprüngliche Nachricht-----
Von: jude [mailto:flexcapaci...@gmail.com] 
Gesendet: Samstag, 3. Mai 2014 14:42
An: users@flex.apache.org
Betreff: Re: Displaying HTML content in Flex Mobile Application

This sets the x, y, width and height:

stageWebView.viewPort = new Rectangle(305, 87, 715, 606);

You've moved the x from 0 to 305 but have changed the width. You would want to 
adjust the width to make sure it fits in the available stage width.

stageWebView.viewPort = new Rectangle(305, 87, 410, 606);

Check out,
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#stageWidth.




On Sat, May 3, 2014 at 1:04 AM, sam991 <samarth.gu...@firmwisegroup.com>wrote:

> my code to display PDF is this:
>
> pdf = new File(File.applicationDirectory.resolvePath("images/" + 
> Global.selectedPDF).nativePath).url;
>
> stageWebView = new StageWebView();
> stageWebView.stage = this.stage;
> stageWebView.viewPort = new Rectangle(0, 87, 715, 606); 
> stageWebView.loadURL(pdf);
>
> When i run above code i get this result
>
> <http://apache-flex-users.2333346.n4.nabble.com/file/n6367/1.png>
>
> but when i change this line to
> stageWebView.viewPort = new Rectangle(305, 87, 715, 606);
>
> i get this result:
>
> <http://apache-flex-users.2333346.n4.nabble.com/file/n6367/2.png>
>
> my stagewebview size is the same but the pdf content has beyond the 
> boundary of stagewebview
>
> how can i fix this?
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Re-Displaying-HTML-cont
> ent-in-Flex-Mobile-Application-tp6364p6367.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Reply via email to