@nativescript/pdf
A NativeScript plugin to display PDF files on iOS and Android
npm i --save @nativescript/pdf

@nativescript/pdf

A simple PDF viewer.

Remark This repository is the replacement for madmas/nativescript-pdf-view which was a fork of the original by Merott and will be used with his consent to provide further maintenance of this NativeScript plugin.

It serves minimal PDF view implementation that does only one thing, and that is to display PDF files in the simplest way possible. It conveniently uses the iOS WKWebView, and for Android it uses AndroidPdfViewer.

Installation

npm install @nativescript/pdf

Usage

Vanilla NativeScript

<Page
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:pdf="@nativescript/pdf"
loaded="pageLoaded">

<pdf:PDFView src="{{ pdfUrl }}" load="{{ onLoad }}" />
</Page>

Angular

import { NativeScriptPdfModule } from '@nativescript/pdf/angular'

@NgModule({
imports: [
NativeScriptCommonModule,
...
NativeScriptPdfModule
],
<PDFView [src]="src" (load)="onLoad()"></PDFView>

Samples

There are sample applications avalable: