下载pdf并在Google doc中打开,并带有下载通知 [英] download pdf and open it in google doc with download notification

查看:87
本文介绍了下载pdf并在Google doc中打开,并带有下载通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个按钮,每当用户按下该按钮时,就会下载一个PDF,并且该pdf在google doc或任何其他pdf阅读器中打开.

I want to make a button that whenever a user presses that button, a PDF will downloaded and that pdf opens in google doc or any other pdf reader.

,该pdf文件将通过网址提供.

and that pdf will provide from url.

我正在使用Java编程语言.帮我做到这一点.

I am using java programming language. Help me to do this.

推荐答案

hii Buddy,我们有很多方法可以在Google文档中打开pdf文件

hii Buddy we are having many ways of opening the pdf file in Google Docs

android意向

   String pdfurl = "http://www.example.com/abcd.pdf";
   String googleDocsUrl = "http://docs.google.com/viewer?url="+pdfurl;
   Intent intent = new Intent(Intent.ACTION_VIEW);
   intent.setDataAndType(Uri.parse(googleDocsUrl ), "text/html");
   startActivity(intent);

网络视图

WebView webview = new WebView(this); 
setContentView(webview); 
webview.getSettings().setJavaScriptEnabled(true); 
webview.loadUrl("example.com/abc.pdf");

学习如何打开PDF文件

这篇关于下载pdf并在Google doc中打开,并带有下载通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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