Skip to main content
Known Participant
August 12, 2016
Answered

stagewebview Windows pdfs

  • August 12, 2016
  • 2 replies
  • 923 views

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?

This topic has been closed for replies.
Correct answer User Unknow

If user have Acrobat Reader installed - it will be used to display PDF inside StageWebView. This is a case of

new StageWebView(true);

2 replies

Inspiring
August 12, 2016

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

Known Participant
August 12, 2016

This is a good idea but unfortunately I need this to work offline.

User Unknow
User UnknowCorrect answer
Legend
August 13, 2016

If user have Acrobat Reader installed - it will be used to display PDF inside StageWebView. This is a case of

new StageWebView(true);

August 12, 2016

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."

Adobe Flash Platform * Adding PDF content in AIR