Document Viewer

Contents

This plugin offers a slim API to view PDF files which are either stored in the apps assets folder (/www/*) or in any other file system directory available via the cordova file plugin.

https://github.com/sitewaerts/cordova-plugin-document-viewer

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-document-viewer npm install @ionic-native/document-viewer
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/document-viewer

Supported Platforms

  • Android
  • iOS
  • Windows

Usage

import { DocumentViewer } from '@ionic-native/document-viewer/ngx';


constructor(private document: DocumentViewer) { }

...
const options: DocumentViewerOptions = {
  title: 'My PDF'
}

this.document.viewDocument('assets/myFile.pdf', 'application/pdf', options)