Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Xamarin Android binding library forhttps://github.com/Dmitry-Borodin/pdfview-android

License

NotificationsYou must be signed in to change notification settings

SIDOVSKY/pdfview-android-xamarin-binding

Repository files navigation

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

PLATFORMAPI

Available on NuGet:NuGet

Preview

PREVIEW

Installing

AddNuGet package to your Xamarin.Android project

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

Setup and Usage

  • Add to your layout file
<com.pdfview.PDFViewandroid: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 usePDFView.FromPath(string).Show():
FindViewById<PDFView>(Resource.Id.pdf_view).FromPath("path-to-temp-folder/fileName.pdf").Show();

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

For details please visit Subsampling Scale Image Viewwiki page.

Apk size impact

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

This library doesn't referenceXamarin.Kotlin.StdLib because it doesn't need kotlin-stdlibbinding 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 deployPDFView-Android.Sample project to your android device/emulator.

Copyright

See theNOTICE file for details.

License

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

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp