PDF文件的URL不是在工作的PhoneGap [英] Pdf file url's are not working in phonegap

查看:188
本文介绍了PDF文件的URL不是在工作的PhoneGap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用

window.open(url, '_blank', 'location=no') 

打开外部网页,其中该网页包含PDF文件的链接。这个问题现在面临的这些PDF链接并不是浏览器中运行。

to open external web page, wherein that web page contains pdf file links. The problem am facing is these pdf links are not working within that browser.

如果我用

window.open(url, '_blank', 'location=yes') 

window.open(url, '_blank') 

按预期工作。在这种情况下一切工作正常。

is working as expected. In this scenario everything is working fine.

但因为我的要求是隐藏地址栏,我给位置=没有作为参数传递给 window.open()。在这里,PDF链接不这是通过

But since my requirement is to hide the address bar, am giving location=no as argument to window.open(). Here pdf links are not working inside web page which is opened via

window.open(url, '_blank', 'location=no')

我怎样才能解决这个问题?请给点建议。

How can I resolve this issue? Please give suggestions.

推荐答案

试试这个:

   $(".drawListItem").on("click",function(){

           var url = 'https://www.google.co.in';
           window.open("https://docs.google.com/gview?embedded=true&url="+url,"_blank","location=yes");

   });

这篇关于PDF文件的URL不是在工作的PhoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆