GithubHelp home page GithubHelp logo

Comments (4)

jcesarmobile avatar jcesarmobile commented on July 2, 2024 3

Android webview doesn't render PDF files.
So, yeah, use _system so it uses another app to open the PDF

from cordova-plugin-inappbrowser.

dland512 avatar dland512 commented on July 2, 2024

I'm using Cordova, not ionic, but I am also seeing a similar issue with PDFs on Android. I don't get any errors, just a blank screen. If I change _blank to _system it works. Is that just how it is on Android?

window.cordova.InAppBrowser.open('https://some.url', '_blank', 'location=no');

from cordova-plugin-inappbrowser.

ansarikhurshid786 avatar ansarikhurshid786 commented on July 2, 2024

@dland512 if your pdf on server try to use encodeduri like : encodeURI(uri), it work fine most of case.

I want to give user best experience so I am downloading and opening in available pdf reader in user's device.

from cordova-plugin-inappbrowser.

JPustkuchen avatar JPustkuchen commented on July 2, 2024

If PDF files are linked in a page which is shown in the inAppBrowser, the inAppBrowser will simply do nothing when clicking the link (as far as I know). My solution uses "beforeload" to decide how to handle the link:
https://julian.pustkuchen.com/node/809

Perhaps this helps others who don't have the link in their application, but in inAppBrowser content, where other JS solutions fail.

from cordova-plugin-inappbrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.