google pdf查看器(不能在pdf网址中使用参数) [英] google pdf viewer (cant use params in the pdf url)

查看:145
本文介绍了google pdf查看器(不能在pdf网址中使用参数)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Drive浏览器在我的应用程序中(使用Ionic)呈现外部网址.就像这样:

Im using the google drive viewer to render external urls in my App (with ionic). It's something like this:

<iframe src="https://docs.google.com/viewer/viewer?url=http://domain.com/pdf_petition.php?param1=a&param2=b">...

问题是Google查看器仅从网址中获取第一个参数,而忽略了第二个参数.

The question is that google viewer only take the first parameter from the url, ignoring the second parameter.

我尝试解析pdf网址(例如http%3A%2F%2Fdomain%2Fpdf_petition.php%3Fparam1%3Da%26zparam2%3Db),但查看器无法加载任何内容.

I've tried parsing the pdf url (like http%3A%2F%2Fdomain%2Fpdf_petition.php%3Fparam1%3Da%26zparam2%3Db ) but the viewer cant load anything.

有一种特殊的形式可以在pdf网址中获取参数?

There is a special form to get parameters in the pdf url ?

推荐答案

我遇到了同样的问题,只是对&进行编码(用%26替换)应该可以解决问题.

I had the same issue, just encode & (replace with %26) That should do the trick.

这篇关于google pdf查看器(不能在pdf网址中使用参数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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