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 <[email protected]>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-content-in-Flex-Mobile-Application-tp6364p6367.html > Sent from the Apache Flex Users mailing list archive at Nabble.com. >
