Lightweight PDF Renderer Android

Overview

AndroidPdfViewer

Lightweight PDF Renderer Android

Library for displaying PDF documents on Android, with animations, gestures, zoom and double tap support.Works on API 21 (Android 5.0) and higher.

Installation

Step 1. Add it in your root build.gradle at the end of repositories:

allprojects {
		repositories {
			...
			maven { url 'https://www.jitpack.io' }
		}
	}

Step 2. Add the dependency

dependencies {
	        implementation 'com.github.manishkummar21:AndroidPdfViewer:1.0'
	}

Include PDFViewActivity in your manifest file

<activity android:name="com.github.pdfviewer.PDFViewActivity" />

Load a PDF file from anywhere in your code

PDFView.with(context)
       .fromfilepath(fileapth)
       .swipeHorizontal(false) //if false pageswipe is vertical otherwise its horizontal
   .start();

//Example of loading pdf file from asset folder


File file = new File(getCacheDir(), "sample.pdf");
       if (!file.exists()) {

           try {
               InputStream asset = getAssets().open("sample.pdf");
               FileOutputStream output = null;
               output = new FileOutputStream(file);
               final byte[] buffer = new byte[1024];
               int size;
               while ((size = asset.read(buffer)) != -1) {
                   output.write(buffer, 0, size);
               }
               asset.close();
               output.close();
           } catch (IOException e) {
               e.printStackTrace();
           }

       }
   
   
       PDFView.with(this)
               .fromfilepath(file.getAbsolutePath()))
               .swipeHorizontal(false)
               .start()

ScreenShot

ScreenShot

You might also like...
Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project.

Kotlin API for React Test Renderer Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project. How

UltralightFabric - Ultralight, a HTML + CSS renderer for Fabric

Xander's Fabric Template for Kotlin The best Fabric template using kotlin. Usage Mod Development: Please read the Fabric Wiki for general mod developm

[] A fast PDF reader component for Android development
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

Pdf Viewer library for Android

This is a packaging of the project "Android PDF Viewer" (http://andpdf.sourceforge.net/) into a reusable library to make PDF viewing easier from withi

Simple library to generate and view PDF in Android
Simple library to generate and view PDF in Android

PDFCreatorAndroid Simple library to generate and view PDF in Android A simple library to create and view PDF with zero dependency Or native code. Add

HTML to PDF convertor for Android

HTML to PDF Convertor A simple HTML to PDF convertor for Android Download Add mavenCentral() repository in project's build.gradle allprojects { re

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices

KOReader is a document viewer primarily aimed at e-ink readers. Download • Wiki • Developer docs Main features portable: runs on embedded devices (Cer

 Green Pass: PDF Reader (unofficial) Android App
Green Pass: PDF Reader (unofficial) Android App

Green Pass: PDF Reader (unofficial) Android App Offers a convenient access to a single one-sided PDF document and its QR code (if present in the docum

HTML to PDF convertor for Android

HTML to PDF Convertor A simple HTML to PDF convertor for Android Download Add mavenCentral() repository in project's build.gradle allprojects { re

A simple Pdf document viewer 💼
A simple Pdf document viewer 💼

Pdf Viewer Plus Screenshots Main Page Main Page Cyanea Permissions and privacy This app does not collect any data. The following permissions are requi

Sample app for Amazon_IAP base on Amazon_IAP_eBook.pdf

AmazonIAP Sample app for Amazon_IAP base on Amazon_IAP_eBook.pdf You can download IAP

With the Help of this libray you can pic image from camera, gallery, it's support image cropping as well and you can pic PDF

FilePicker This project aims to provide an ultimate and flexible image picking from Gallery, Camera and cropping experience as well as PDF picking fro

FCM : FirePush is a lightweight Kotlin/Android library to send FCM push notifications to Android, iOS & Web like a pro.
FCM : FirePush is a lightweight Kotlin/Android library to send FCM push notifications to Android, iOS & Web like a pro.

FirePush - A Lightweight Kotlin Library for sending FCM push notification Hi, I made this Library for a Chat based project I was working on. So I deci

Scp-wallet-android - Lightweight ScPrime wallet for Android
Scp-wallet-android - Lightweight ScPrime wallet for Android

SCP Wallet Android SCP Wallet is lightweight ScPrime wallet for Android. Get sta

Android.compose.squircle - Android LightWeight Squircle Library for JetPack Compose

Android LightWeight Squircle Library for JetPack Compose Usage Based on Compose

Android-easy-permissions-kt - EasyPermissionsKt - A lightweight Android library that abstracts all runtime permission boilerplate code to simplify the system permissions managemen Echo is a lightweight and minimal music player for Android, built with Android Studio and written in Kotlin
Echo is a lightweight and minimal music player for Android, built with Android Studio and written in Kotlin

Echo - Echo, A light-weight, minimal music player for Android, with shuffle, favorites and audio visualization

A lightweight Android browser with modern navigation
A lightweight Android browser with modern navigation

Lightning Browser Speed, Simplicity, Security Download Master Branch Dev Branch Features Bookmarks History Multiple search engines (Google, Bing, Yaho

Lightweight Android library for cool activity transition animations

Bungee min SDK 16 (Android Jellybean 4.1) written in Java A lightweight, easy-to-use Android library that provides awesome activity transition animati

Comments
  • load pdf in specific page

    load pdf in specific page

    hi i would like to suggest a new feature, when we could specify the default page to display. i hope you accept this:

    PDFView.with(this)
                    .setfilepath(file.getAbsolutePath())
                    .setPage(2) // open the page index 2 as default page view
                    .setSwipeOrientation(1)
                    .start();
    
    opened by chlegou 0
Owner
MANISH KUMAR
Senior Android Developer
MANISH KUMAR
An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices

KOReader is a document viewer primarily aimed at e-ink readers. Download • Wiki • Developer docs Main features portable: runs on embedded devices (Cer

KOReader Community 12k Jan 4, 2023
Green Pass: PDF Reader (unofficial) Android App

Green Pass: PDF Reader (unofficial) Android App Offers a convenient access to a single one-sided PDF document and its QR code (if present in the docum

Michael Troger 32 Dec 31, 2022
HTML to PDF convertor for Android

HTML to PDF Convertor A simple HTML to PDF convertor for Android Download Add mavenCentral() repository in project's build.gradle allprojects { re

MD Danish Ansari 48 Jan 2, 2023
A simple Pdf document viewer 💼

Pdf Viewer Plus Screenshots Main Page Main Page Cyanea Permissions and privacy This app does not collect any data. The following permissions are requi

gokul 332 Dec 7, 2022
Document Viewer is a highly customizable document viewer for Android.

Document Viewer Document Viewer is a highly customizable document viewer for Android. Supports the following formats: PDF DjVu EPUB XPS (OpenXPS) CBZ

Sufficiently Secure 492 Jan 8, 2023
Librera Reader is an e-book reader for Android devices;

Librera Reader is an e-book reader for Android devices; it supports the following formats: PDF, EPUB, EPUB3, MOBI, DjVu, FB2, TXT, RTF, AZW, AZW3, HTML, CBZ, CBR, DOC, DOCX, and OPDS Catalogs

Ivan Ivanenko 1.3k Jan 2, 2023
OpenNoteScanner - Android application for scanning and manipulating handwritten notes and documents.

OpenNoteScanner This little application provides a way on scanning handwritten notes and printed documents. It automatically detect the edge of the pa

Claudemir Todo Bom 1.2k Jan 1, 2023
Pdf Reader: Read text in PDF with Text to Speech

PDF Reader PDF Reader Read text in PDF with Text to Speech APK Link Here | App D

Rushikesh Suryawanshi 0 Jan 21, 2022
Pdf Extractor - Covert array list of object to pdf table

Pdf Extractor - Covert array list of object to pdf table

Mostafa Gad 8 Apr 3, 2022
Markdown renderer for Kotlin Compose Multiplatform (Android, Desktop)

Markdown renderer for Kotlin Compose Multiplatform (Android, Desktop)

Mike Penz 129 Jan 1, 2023