Skip to content
A basic PDF viewer to display PDF documents on iOS and Android
TypeScript CSS HTML
Branch: master
Clone or download
Pull request Compare This branch is 28 commits ahead, 6 commits behind Merott:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
platforms/android
.gitignore
.npmignore
AndroidPdfViewer.d.ts
LICENSE
README.md
index.d.ts
package.json
pdfviewer.android.d.ts
pdfviewer.android.ts
pdfviewer.common.d.ts
pdfviewer.common.ts
pdfviewer.ios.d.ts
pdfviewer.ios.ts
references.d.ts
tsconfig.json
tslint.json

README.md

nativescript-pdf-viewer

This is a very basic PDF view implementation that does only one thing, and that is to display PDF files. It conveniently uses the iOS UIWebView, but for Android it uses AndroidPdfViewer.

This plugin does the bare minimum required to render the PDF, no configuration options, and no error handling have been built yet. I welcome all Pull Requests!

Usage

Demo

Check out the demo folder for a sample usage.

Angular 2

If you're using the plugin with Angular 2, the plugin automatically registers PDFViewer as a valid tag for Angular templates. Usage is simple:

  1. Make sure to import nativescript-pdf-viewer somewhere in your code, e.g:
import 'nativescript-pdf-viewer';
  1. Include the tag in your template:
<PDFViewer [src]="localPath"></PDFViewer>

Try the Demo

To try the demo run the following commands:

npm run setup
npm run demo.ios
npm run demo.android
You can’t perform that action at this time.