javascript - Not able to launch a pdf file in inappbrowser in android -


When a user clicks on a link, then I need to show a PDF in the InputIt is working fine in iOS , But is not working on Android. I am using IBM Vernal for my project, I use the code below:

  window.open ("pdfURL", "_ blank", "location = yes");   

Launches the InAppbrowser in iOS and displays the PDF, but the introduction of the Epobox in Android but no content is displayed

So Android is going to fail.

In Android, you have 2 options:

  1. View the file using Google Docs By storing the file on a remote server and redirecting the user such as: window.open (encoded ('https: // docs. Google.com/gview?embedded=true&url=http://www.your-server.com/files/your_file.pdf '),' _blank ',' location = yes, enableViewPortScale = yes');

  2. Or use a Cordova plug-in for example (you can search Google for more) For that, you have to learn

    You can read more options here:

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

C++ Array Type Not Assignable in Copy Constructor -