On iOS you can just use StageWebView to open PDF docs. Should work without problems and there are many code examples around.

Android is more complicated because it doesn't support viewing PDF in a browser in general. Therefore StageWebView can't open it either. There is only one solution to open PDF from AIR app and one workaround (actually, both are workarounds).

1) Download PDF from a remote location and store it locally. Then use some ANE to open it in a default viewer.
There are several native extensions around that can be used for this.

2) Convert PDF to HTML and images on the server side and open it in a StageWebView
This is more complicated solution and depends on what you can do on server.
Some people use trick with Google docs and use it for converting PDF to HTML.
This is an example:
http://docs.google.com/viewer?url=www.education.gov.yk.ca/pdf/pdf-test.pdf
However, if you have some confidential or private docs I wouldn't recommend using Google docs hack.

I guess it's not what you wanted to hear, but hope it will save you some research time...
Cheers,

Tomislav

On 7.2.2013. 20:11, Angelo Lazzari wrote:
Hi all,
I'm developing a flex mobile app with apache flex 4.9.

Using alivePDF swc the app creates a pdf file and next step is to show that pdf 
in the same mobile app.

I found a lot of sites/blog that speak about stagewebview and 
navigatetourl...etc etc but nothing seems to work properly.

Can you suggest me a sure method to open the pdf for ios and android devices?

Thank you very much and congratulation to everyone is working on apache flex 
project.

Bye,
Angelo

Sent from my 

Reply via email to