Skip to content

A basic PDF viewer to display PDF documents on iOS and Android

License

Notifications You must be signed in to change notification settings

dpdragnev/nativescript-pdf-view

 
 

Repository files navigation

nativescript-pdf-view

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

Check out the demo folder for a sample usage.

Angular 2

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

  1. Make sure to import nativescript-pdf-view somewhere in your code, e.g:
import 'nativescript-pdf-view';
  1. Include the tag in your template:
<PDFView [src]="src" (load)="onLoad()"></PDFView>

Try the Demo

To try the demo, cd into the demo folder, and run the following commands:

npm install

# iOS
tns platform add ios
tns run ios

# Android
tns platform add android
tns run android

About

A basic PDF viewer to display PDF documents on iOS and Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%