GithubHelp home page GithubHelp logo

hhy5277 / flutter_pdf_viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scientifichackers/flutter_pdf_viewer

0.0 1.0 0.0 10.59 MB

A native PDF viewer for flutter.

License: MIT License

Kotlin 60.91% Swift 2.14% Objective-C 0.94% Dart 34.53% Ruby 1.49%

flutter_pdf_viewer's Introduction

Sponsor pub package

flutter pdf viewer

A native Pdf viewer for flutter, built on AndroidPdfViewer.

P.S. Android Only!

Features

  • Night Mode
  • Scroll Bar
  • Horizontal swipe
  • Pinch to zoom
  • Show inline Videos in Pdf
  • Immersive mode
  • Page by page analytics

Security

  • Features fast native speed XOR - decryption of files.
  • Password protected pdf.
  • Display PDF from bytes without ever touching the disk!

Drawbacks

  • Inline Pdf Viewing is not supported. ( A new activity is opened ). See #1.

    A proof of concept for inline PDFs is available at the inline branch.

Install

To use this plugin, follow the installation instructions.

License: MIT

NOTE: You must add these lines at android/app/build.gradle.

(This is required by ExoPlayer, which is used to play videos).

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Example

$ git clone https://github.com/pycampers/flutter_pdf_viewer.git
$ cd flutter_pdf_viewer/example
$ flutter run

Preview

Generating 64-bit APKs

The Underlying native library tends to blow up the APK size. So, you can build a separate APK for each CPU architecture.

This will also fix an issue with flutter tooling, where 64-bit ARM devices don't work.

Add the following section in android/app/build.gradle -

android {
    defaultConfig {
        ndk {
            abiFilters "<arch>"
        }
    }
}
  • For 32-bit APK, replace <arch> with armeabi-v7a, and run $ flutter build apk --release as usual.

  • For 64-bit APK, replace <arch> with arm64-v8a, and run $ flutter build apk --release --target-platform=android-arm64.

Now you have 2 Apks, which you will need to publish separately to the Play Store. For that you need to tweak the android:versionCode property to have slightly different values for each build.

The exact "Rules for multiple APKs" can be found here.

Thanks


๐Ÿ๐Ÿ•๏ธ

flutter_pdf_viewer's People

Contributors

devxpy avatar

Watchers

 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.