Copy link to clipboard
Copied
I am developing an air application that downloads pdfs and displays them using stagewebview. The application works as expected on ios and Mac. The problem I am running into is when displaying pdfs on windows. Instead of showing the pdf, it prompts the user to download the file. It seems like it isn't using browser plugins. When I use the browser outside of the air application it displays pdfs as expected. Any ideas of how to fix this?
If user have Acrobat Reader installed - it will be used to display PDF inside StageWebView. This is a case of
new StageWebView(true);
Copy link to clipboard
Copied
I am developing an air application that downloads pdfs and displays them using stagewebview. The application works as expected on ios and Mac. The problem I am running into is when displaying pdfs on windows. Instead of showing the pdf, it prompts the user to download the file. It seems like it isn't using browser plugins. When I use the browser outside of the air application it displays pdfs as expected. Any ideas of how to fix this?
If user have Acrobat Reader installed - it will be used to display PDF inside StageWebView. This is a case of
new StageWebView(true);
Copy link to clipboard
Copied
According to Adobe documentation, unless you are using a custom library or 3rd party library, the only way to display PDFs in Flash is if the Adobe Acrobat Reader is installed.
"Important: To render PDF content in AIR, the user must have Adobe Reader or Adobe® Acrobat® version 8.1 or higher installed."
Copy link to clipboard
Copied
I ran into this same problem for a Desktop AIR app I built. My solution was to instead of directly linking the PDF in the stageWebView, I instead linked to this:
http://docs.google.com/viewer?url=http://url.to.your.pdf
It's basically Googles PDF viewer that works and displays PDFs correctly inside of StageWebView.
Example: http://docs.google.com/viewer?url=http://help.adobe.com/en_US/air/build/air_buildingapps.pdf
Copy link to clipboard
Copied
This is a good idea but unfortunately I need this to work offline.
Copy link to clipboard
Copied
If user have Acrobat Reader installed - it will be used to display PDF inside StageWebView. This is a case of
new StageWebView(true);
Copy link to clipboard
Copied
looks like the problem was just that Acrobat Reader wasn't installed. Thanks for the help.