问题描述
我正在使用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¶m2=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网址中使用参数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!