【问题标题】:How to curl pdf pages in android如何在android中卷曲pdf页面
【发布时间】:2015-03-04 07:52:35
【问题描述】:

我搜索了很多,但没有在我的项目中实现正确的代码,我想像普通书一样卷曲 PDF 文件的每一页,但无法做到,当我点击按钮 PDF 文件时在我的代码中从 SD 卡加载。

File file = new File("/sdcard/android.pdf");
if (file.exists()) {
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
     startActivity(intent);
      } 
      catch (ActivityNotFoundException e) {
       Toast.makeText(MainActivity.this, 
       "No Application Available to View PDF", 
                  Toast.LENGTH_SHORT).show();
                }
            }

【问题讨论】:

    标签: android pdf page-curl


    【解决方案1】:

    curl 抓取完整的网页/文件。您需要在抓取或使用第三方工具或网站后将 PDF 拆分为单独的页面,然后抓取它生成的单个页面

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-02
    • 1970-01-01
    • 2011-04-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多