MCPcopy Index your code
hub / github.com/JoanZapata/android-pdfview

github.com/JoanZapata/android-pdfview @android-pdfview-parent-1.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release android-pdfview-parent-1.0.4 ↗ · + Follow
415 symbols 895 edges 46 files 47 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Android Arsenal

Screenshot of the sample app

Android PDFView is a library which provides a fast PDFView component for Android, with animations, gestures, and zoom. It's based on VuDroid for decoding the PDF file.

Get it

Android PDFView is available in Maven Central.

<dependency>
    <groupId>com.joanzapata.pdfview</groupId>
    <artifactId>android-pdfview</artifactId>
    <version>1.0.3</version>
    <type>apklib</type>
</dependency>

Or via gradle:

compile 'com.joanzapata.pdfview:android-pdfview:1.0.3@aar'

Include PDFView in your layout

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

Load a PDF file

pdfView.fromAsset(pdfName)
    .pages(0, 2, 1, 3, 3, 3)
    .defaultPage(1)
    .showMinimap(false)
    .enableSwipe(true)
    .onDraw(onDrawListener)
    .onLoad(onLoadCompleteListener)
    .onPageChange(onPageChangeListener)
    .load();
  • pages is optional, it allows you to filter and order the pages of the PDF as you need
  • onDraw is also optional, and allows you to draw something on a provided canvas, above the current page

License

Copyright 2013-2015 Joan Zapata

This file is part of Android-pdfview.

Android-pdfview is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Android-pdfview is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Android-pdfview.  If not, see <http://www.gnu.org/licenses/>.

Extension points exported contracts — how you extend this code

OnPageChangeListener (Interface)
Implements this interface to receive events from IPDFView when a page has changed through swipe [2 implementers]
android-pdfview/src/main/java/com/joanzapata/pdfview/listener/OnPageChangeListener.java
OnDragListener (Interface)
Implement this interface to receive Drag events [2 implementers]
android-pdfview/src/main/java/com/joanzapata/pdfview/util/DragPinchListener.java
OnPinchListener (Interface)
Implement this interface to receive Pinch events [2 implementers]
android-pdfview/src/main/java/com/joanzapata/pdfview/util/DragPinchListener.java
OnDoubleTapListener (Interface)
Implement this interface to receive Double Tap events [2 implementers]
android-pdfview/src/main/java/com/joanzapata/pdfview/util/DragPinchListener.java
CodecDocument (Interface)
(no doc) [3 implementers]
android-pdfview/src/main/java/org/vudroid/core/codec/CodecDocument.java

Core symbols most depended-on inside this repo

toCurrentScale
called by 42
android-pdfview/src/main/java/com/joanzapata/pdfview/PDFView.java
getWidth
called by 36
android-pdfview/src/main/java/org/vudroid/core/codec/CodecPage.java
getHeight
called by 26
android-pdfview/src/main/java/org/vudroid/core/codec/CodecPage.java
recycle
called by 18
android-pdfview/src/main/java/org/vudroid/core/codec/CodecPage.java
getBitmap
called by 9
android-pdfview/src/main/java/org/vudroid/core/PageTreeNode.java
getZoom
called by 8
android-pdfview/src/main/java/org/vudroid/core/models/ZoomModel.java
calculateCenterOffsetForPage
called by 8
android-pdfview/src/main/java/com/joanzapata/pdfview/PDFView.java
getRenderedBitmap
called by 8
android-pdfview/src/main/java/com/joanzapata/pdfview/model/PagePart.java

Shape

Method 349
Class 43
Interface 21
Enum 2

Languages

Java100%

Modules by API surface

android-pdfview/src/main/java/com/joanzapata/pdfview/PDFView.java63 symbols
android-pdfview/src/main/java/org/vudroid/core/DocumentView.java32 symbols
android-pdfview/src/main/java/org/vudroid/core/PageTreeNode.java28 symbols
android-pdfview/src/main/java/org/vudroid/core/DecodeServiceBase.java27 symbols
android-pdfview/src/main/java/com/joanzapata/pdfview/util/DragPinchListener.java21 symbols
android-pdfview/src/main/java/com/joanzapata/pdfview/AnimationManager.java16 symbols
android-pdfview/src/main/java/org/vudroid/pdfdroid/codec/PdfPage.java15 symbols
android-pdfview/src/main/java/org/vudroid/core/DecodeService.java15 symbols
android-pdfview/src/main/java/org/vudroid/core/Page.java14 symbols
android-pdfview/src/main/java/com/joanzapata/pdfview/CacheManager.java14 symbols
android-pdfview/src/main/java/com/joanzapata/pdfview/model/PagePart.java12 symbols
android-pdfview/src/main/java/com/joanzapata/pdfview/RenderingAsyncTask.java12 symbols

For agents

$ claude mcp add android-pdfview \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page