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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xamarin.Bindings.PDFView-Android" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.Bindings.PDFView-Android --version 1.1.0                
#r "nuget: Xamarin.Bindings.PDFView-Android, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.1.0 19,666 11/16/2020
1.0.0 1,911 10/6/2019

* pdfview-android java library updated to commit 1438138
     * removed android.support dependency, can be used with androidx without migration