Xamarin.Bindings.PDFView-Android
1.1.0
Requires NuGet 2.5 or higher.
dotnet add package Xamarin.Bindings.PDFView-Android --version 1.1.0
NuGet\Install-Package Xamarin.Bindings.PDFView-Android -Version 1.1.0
<PackageReference Include="Xamarin.Bindings.PDFView-Android" Version="1.1.0" />
paket add Xamarin.Bindings.PDFView-Android --version 1.1.0
#r "nuget: Xamarin.Bindings.PDFView-Android, 1.1.0"
// Install Xamarin.Bindings.PDFView-Android as a Cake Addin #addin nuget:?package=Xamarin.Bindings.PDFView-Android&version=1.1.0 // Install Xamarin.Bindings.PDFView-Android as a Cake Tool #tool nuget:?package=Xamarin.Bindings.PDFView-Android&version=1.1.0
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();
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-android was computed. net7.0-android was computed. net8.0-android was computed. |
MonoAndroid | monoandroid is compatible. |
-
MonoAndroid 0.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
* pdfview-android java library updated to commit 1438138
* removed android.support dependency, can be used with androidx without migration