我想知道我做错了什么。基本上,我会在google视图中打开一些pdf:
<a id="pdflink" href="https://docs.google.com/viewer?url=http://pdpdpd.pdf" target="_blank">Pdf</a>但当它打开它时,我看到了视图中的典型工具,如放大镜,打印,打开原稿,等等;好吧,打印和打开原稿将不会工作,我没有问题,他们在我的电脑上的chrome,但在手机上安装后它不会工作,页面将保持空白。
那会是什么呢?
发布于 2015-07-17 19:03:39
您是否正在尝试通过另一个网站链接脱机网站?
如果您正在尝试链接,则使用href而不是id
发布于 2015-07-17 19:50:59
不幸的是,你不能下载所有的文件URL标记到href。
文件
无论如何,您在答案中提到的URL没有正确的PDF。
发布于 2015-07-17 21:40:01
使用文件传输插件下载文件。
https://github.com/apache/cordova-plugin-file-transfer
fileTransfer.download(
uri,
fileURL,
function(entry) {
console.log("download complete: " + entry.toURL());
},
function(error) {
console.log("download error source " + error.source);
console.log("download error target " + error.target);
console.log("upload error code" + error.code);
}
);https://stackoverflow.com/questions/31474280
复制相似问题