GithubHelp home page GithubHelp logo

zhangeshihuai / androidpdfviewdowload Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qiushi123/androidpdfviewdowload

0.0 2.0 0.0 467 KB

android显示PDF文件 ,自定义pdf显示控件,一行代码快速实现pdf下载与本地PDF快速预览,支持线上各种文件下载到本地

Java 100.00%

androidpdfviewdowload's Introduction

AndroidPdfViewDowload

一行代码快速实现pdf下载与本地PDF快速预览,支持线上各种文件下载到本地

##一行代码快速实现PDF的在线下载与本地预览

##使用到的技术 1,Okhttp下载文件 2,pdfview显示PDF

#下面是效果图 ##下载中

image

##下载完成

image

##显示效果

image

##支持放大缩小显示

image

#代码很简单,可以到下载demo查看,下面只贴出重要代码

#1,下载pdf OkHttpUtils.get(pdfUrl)// .tag(this)// .execute(new DownloadFileCallBack(Environment.getExternalStorageDirectory() + "/temp", "qcl.pdf"));//保存到sd卡

#2,显示pdf pdfView.fromFile(file) // .pages(0, 0, 0, 0, 0, 0) // 默认全部显示,pages属性可以过滤性显示 .defaultPage(1)//默认展示第一页 .onPageChange(this)//监听页面切换 .load();

#3,简单贴下布局代码

<com.joanzapata.pdfview.PDFView
    android:id="@+id/pdfView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<TextView
    android:id="@+id/text"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="5dp"
    android:text="1/10"/>

我的博客 http://blog.csdn.net/qiushi_1990/article/details/51943883

androidpdfviewdowload's People

Contributors

qiushi123 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.