Comments (4)
Android webview doesn't render PDF files.
So, yeah, use _system so it uses another app to open the PDF
from cordova-plugin-inappbrowser.
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.
@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.
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)
- 6.0.0 Update throws error while archiving iOS project: "'Cordova/CDVWebViewProcessPoolFactory.h' file not found" HOT 1
- "browser.on('loaderror')" does not work properly on iOS.
- executeScript not working in colab HOT 4
- How to build this plugin for node_modules? HOT 2
- Add option to respect/ignore safe area on iOS
- ref.executeScript can't write clipboard HOT 5
- window.open doesnt work inside the opened webview HOT 2
- Warning when submitting to play store - JavaScript Interface Injection HOT 3
- @awesome-cordova-plugins/in-app-browser, this plugin is not sending the device id to azure while login + iOS HOT 3
- Angular 15 webpage not loading correctly in inappbrowser (Android < 11) HOT 1
- Hide Location & toolbar on scroll
- No visible @interface for 'UIApplication' when building an app for iOS HOT 2
- Can't Retrieve HTMLCollection Object HOT 1
- "The certificate authority is not trusted" - Trying to open my server page HOT 1
- beforeload preventing page navigation HOT 1
- Cannot load URL: Frame Load Interrupted being thrown on URL with a 302 redirect HOT 1
- InAppBrowser not fullscreen
- Unable to get events for _system as target HOT 1
- NullPointerException after resume
- beforeload event behaviour difference between android and ios
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-inappbrowser.