Giter Club home page Giter Club logo

pdfview-android-xamarin-binding's Introduction

PDFView-Android Xamarin Binding

A binding library for https://github.com/Dmitry-Borodin/pdfview-android

PLATFORM API

Available on NuGet: NuGet

Preview

PREVIEW

Installing

Add NuGet package to your Xamarin.Android project

PM> Install-Package Xamarin.Bindings.PDFView-Android

Setup and Usage

  • Add to your layout file
<com.pdfview.PDFView
    android:id="@+id/pdf_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
  • Load bundled file:
FindViewById<PDFView>(Resource.Id.pdf_view)
    .FromAsset("asset_file.pdf")
    .Show();
  • To open pdf from the Internet, first download it to a temporary folder and then use PDFView.FromPath(string).Show():
FindViewById<PDFView>(Resource.Id.pdf_view)
    .FromPath("path-to-temp-folder/fileName.pdf")
    .Show();

PDFView is inherited from a slightly modified SubsamplingScaleImageView - a beautiful library which provides different configuration options such as scaling, zooming, custom animations and more.

For details please visit Subsampling Scale Image View wiki page.

Apk size impact

  • Projects which already use Kotlin-Stdlib: ~120 Kb
  • Projects without Kotlin-StdLib: ~550 Kb

This library doesn't reference Xamarin.Kotlin.StdLib because it doesn't need kotlin-stdlib binding itself, it uses only java classes from it. Including C# binding classes shipped with Xamarin.Kotlin.StdLib would require ~1.5 Mb of apk size without a reason.

That's why this library also embeds kotlin-stdlib jar.

Resolution of a java class duplication conflict is provided by a special build target. If your project already uses kotlin-stdlib jar then our version will be excluded from compilation.

Try this library in action!

Build and deploy PDFView-Android.Sample project to your android device/emulator.

Copyright

  • Vadim Sedov - Binding library & sample - SIDOVSKY
  • Dmitry Borodin - "pdfview" java library - Dmitry-Borodin
  • David Morrissey - Subsampling Scale Image View library - davemorrissey

See the NOTICE file for details.

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

pdfview-android-xamarin-binding's People

Contributors

sidovsky 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.