How to open PDF file without plugin?
I'm tried : window.open(path, '_blank', 'fullscreen=yes');
and opened blank page in editor.
Do you want the PDF to open inside your app, or is it OK if it's opened externally? If it's the latter:
On iOS you can just create a normal link with target="_blank"
and Phonegap will open the pdf in Safari.
On Android you need to call window.open with "_system" as window name: window.open("yoururl", "_system", "location=no");
and Android will either open in the browser or start downloading (which might not be very obvious), or show the "Complete action using"-dialog if there are several options to open the file.
Of course, the downside of opening externally is that the users need to get back to your app themselves after viewing the PDF, so if you anticipate many users will view the pdf I would not recommend this solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With